* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa, #e4ecf7);
    color:#1a1a1a;
    line-height:1.6;
}

header {
    height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    background: linear-gradient(135deg, #dbeafe, #fce7f3);
    padding:20px;
    position:relative;
}

.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
}

.lang-switch .lang-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    background: #111;
    color: #fff;
    font-family: inherit;
}

.lang-switch .lang-trigger:hover {
    background: #333;
}

.lang-switch .lang-trigger .arrow {
    font-size: 0.7em;
    opacity: 0.9;
    transition: transform 0.2s ease;
}

.lang-switch .lang-dropdown.open .lang-trigger .arrow {
    transform: rotate(180deg);
}

.lang-switch .lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    list-style: none;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 100;
}

.lang-switch .lang-dropdown.open .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switch .lang-dropdown-menu li {
    margin: 0;
}

.lang-switch .lang-dropdown-menu button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
    color: #111;
    font-family: inherit;
}

.lang-switch .lang-dropdown-menu button:hover {
    background: #f0f0f0;
}

header h1 {
    font-size:4rem;
    font-weight:800;
}

header p {
    margin:15px 0 30px;
    opacity:0.8;
}

nav ul {
    list-style:none;
    display:flex;
    gap:25px;
    flex-wrap:wrap;
    justify-content:center;
}

nav a {
    text-decoration:none;
    font-weight:600;
    color:#111;
    padding:10px 18px;
    border-radius:30px;
    transition:0.3s;
}

nav a:hover {
    background:#111;
    color:#fff;
}

nav a.current {
    background:#111;
    color:#fff;
}

section {
    padding:100px 20px;
    max-width:1000px;
    margin:0 auto;
}

section h2 {
    font-size:2.5rem;
    margin-bottom:30px;
}

.card {
    background:rgba(255,255,255,0.6);
    backdrop-filter:blur(12px);
    border-radius:20px;
    padding:30px;
    box-shadow:0 10px 40px rgba(0,0,0,0.05);
    margin-bottom:30px;
}

.contact-intro {
    margin-bottom: 24px;
    opacity: 0.9;
}

.contact-list {
    list-style: none;
    margin-bottom: 24px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.contact-list .contact-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.contact-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.contact-list a {
    color: #111;
    font-weight: 600;
    text-decoration: none;
    min-width: 90px;
}

.contact-list a:hover {
    text-decoration: underline;
}

.contact-value {
    color: #444;
    font-weight: 400;
}

/* Wishes fly zone — пожелания «летают» в блоке */
.wishes-card .wishes-fly-zone {
    min-height: 280px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    justify-content: center;
    align-items: center;
    align-content: center;
    padding: 1rem 0;
}

.wish-bubble {
    max-width: 320px;
    padding: 1rem 1.25rem;
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(254,240,248,0.9));
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 2px 8px rgba(219,234,254,0.4);
    border: 1px solid rgba(255,255,255,0.8);
    animation: wish-float 5s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wish-bubble:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08), 0 4px 12px rgba(219,234,254,0.5);
}

.wish-bubble-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #6b21a8;
    margin-bottom: 0.35rem;
}

.wish-bubble-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
}

@keyframes wish-float {
    0%, 100% { transform: translateY(0) rotate(-0.5deg); }
    33%     { transform: translateY(-6px) translateX(3px) rotate(0.5deg); }
    66%     { transform: translateY(-3px) translateX(-2px) rotate(-0.3deg); }
}

.contact-form-note {
    font-size: 0.95rem;
    opacity: 0.8;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.milestone-list { list-style: none; }
.milestone-list .milestone-card {
    background: rgba(255,255,255,0.5);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.milestone-list .milestone-card:last-child { margin-bottom: 0; }
.milestone-list .milestone-image {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: 12px;
    margin-bottom: 16px;
}
.milestone-list .milestone-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.milestone-list .milestone-desc { color: #444; line-height: 1.6; }

form input, form textarea {
    width:100%;
    padding:12px;
    margin-top:8px;
    margin-bottom:20px;
    border-radius:12px;
    border:1px solid #ddd;
    font-family:inherit;
}

button.submit-btn {
    padding:12px 24px;
    border-radius:30px;
    border:none;
    background:#111;
    color:#fff;
    font-weight:600;
    cursor:pointer;
}

footer {
    text-align:center;
    padding:40px 20px;
    font-size:0.9rem;
    opacity:0.6;
}

/* Page transitions */
body.page-enter {
    animation: pageEnter 0.4s ease forwards;
}

body.page-exit {
    animation: pageExit 0.32s ease forwards;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* Inner page layout: compact header */
body.inner-page header {
    height: auto;
    min-height: 200px;
    padding: 24px 20px 40px;
    justify-content: flex-start;
}

body.inner-page header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

body.inner-page header .subtitle {
    margin: 0 0 20px;
    font-size: 0.95rem;
}

body.inner-page .page-nav {
    margin-top: auto;
}

/* Main content area for inner pages */
main.content {
    padding: 60px 20px 80px;
    max-width: 1000px;
    margin: 0 auto;
}

main.content h2 {
    font-size: 2rem;
    margin-bottom: 24px;
}

/* 8-bit game block */
.game-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.game-heading {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.game-canvas-wrap {
    width: 640px;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    background: #1a1a1a;
}

.game-canvas-wrap canvas {
    display: block;
    width: 640px;
    max-width: 100%;
    height: 360px;
    cursor: default;
}

.game-rules {
    margin-top: 8px;
    font-size: 0.75rem;
    line-height: 1.5;
    opacity: 0.75;
    max-width: 560px;
}
