/* ===== SHARED HEADER & NAV ===== */
header { background: rgba(15, 15, 35, 0.97); color: white; padding: 1rem 0; position: fixed; width: 100%; top: 0; z-index: 1000; backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,212,255,0.12); }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; position: relative; }

.logo { font-size: 1.2rem; font-weight: bold; display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; }
.logo img { height: 38px; border-radius: 8px; }
.logo .subtitle { font-size: 0.65rem; color: rgba(255,255,255,0.45); margin-left: 8px; font-weight: 400; white-space: nowrap; }

nav.desktop-nav { display: flex; gap: 4px; align-items: center; }
nav.desktop-nav a {
    color: rgba(255,255,255,0.72); font-size: 0.92rem; text-decoration: none;
    padding: 8px 14px; border-radius: 8px; transition: all 0.3s;
    white-space: nowrap; position: relative;
}
nav.desktop-nav a::after { display: none; }
nav.desktop-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
nav.desktop-nav a.active { color: #00d4ff; background: rgba(0,212,255,0.08); }

.menu-toggle {
    display: none; font-size: 1.5rem; color: #fff; cursor: pointer;
    padding: 8px; border-radius: 8px; background: none; border: none;
    transition: background 0.3s; line-height: 1;
}
.menu-toggle:hover { background: rgba(255,255,255,0.1); }

nav.mobile-nav {
    display: none; position: fixed; top: 70px; left: 0; right: 0;
    background: rgba(15,15,35,0.98); backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 15px; z-index: 999; flex-direction: column; gap: 4px;
}
nav.mobile-nav.show { display: flex; }
nav.mobile-nav a {
    color: rgba(255,255,255,0.8); font-size: 1rem; text-decoration: none;
    padding: 12px 16px; border-radius: 10px; transition: all 0.3s;
}
nav.mobile-nav a:hover, nav.mobile-nav a.active { color: #00d4ff; background: rgba(0,212,255,0.08); }

@media (max-width: 900px) {
    .header-inner { padding: 0 16px; }
    nav.desktop-nav { display: none; }
    .menu-toggle { display: block !important; }
    nav.mobile-nav {
        display: none;
        position: fixed; top: 70px; left: 0; right: 0;
        background: rgba(15,15,35,0.98); backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255,255,255,0.06);
        padding: 15px; z-index: 999; flex-direction: column; gap: 4px;
    }
    nav.mobile-nav.show { display: flex; }
    nav.mobile-nav a { display: block; padding: 12px 16px; border-radius: 10px; color: rgba(255,255,255,0.8); }
    nav.mobile-nav a:hover, nav.mobile-nav a.active { color: #00d4ff; background: rgba(0,212,255,0.08); }
}

/* ===== PAGE BANNER — matching homepage hero animation ===== */
.page-banner {
    min-height: 60vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0f0f23 100%);
    position: relative; overflow: hidden;
    margin-top: 70px;
}
.page-banner::before {
    content:''; position:absolute; top:0;left:0;right:0;bottom:0;
    background:
        radial-gradient(circle at 20% 80%, rgba(0,212,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118,75,162,0.15) 0%, transparent 50%);
    animation: bannerBgPulse 8s ease-in-out infinite;
}
.page-banner::after {
    content:''; position:absolute; bottom:-2px; left:0; right:0; height:80px;
    background: linear-gradient(to top, #0f0f23, transparent);
}
@keyframes bannerBgPulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.banner-particles {
    position:absolute; top:0;left:0;width:100%;height:100%;
    overflow:hidden; pointer-events: none;
}
.banner-particle {
    position:absolute; width:3px; height:3px;
    background: #00d4ff; border-radius:50%;
    animation: bannerFloat 15s infinite;
}
.banner-particle:nth-child(2) { left:15%; animation-delay:2s; background:#764ba2; }
.banner-particle:nth-child(3) { left:35%; animation-delay:4s; width:5px; height:5px; }
.banner-particle:nth-child(4) { left:55%; animation-delay:6s; background:#764ba2; }
.banner-particle:nth-child(5) { left:75%; animation-delay:8s; }
.banner-particle:nth-child(6) { left:90%; animation-delay:10s; background:#764ba2; }
@keyframes bannerFloat {
    0%   { transform:translateY(100vh) rotate(0deg); opacity:0; }
    8%   { opacity:0.7; }
    92%  { opacity:0.7; }
    100% { transform:translateY(-100vh) rotate(720deg); opacity:0; }
}
.banner-content { text-align: center; z-index: 1; padding: 50px 20px; max-width: 800px; position: relative; }
.banner-content h1 {
    font-size: 3.5rem; margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #00d4ff 50%, #764ba2 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; font-weight: 700; line-height: 1.2;
    animation: bannerTitleGlow 3s ease-in-out infinite;
}
@keyframes bannerTitleGlow {
    0%,100% { filter: drop-shadow(0 0 20px rgba(0,212,255,0.25)); }
    50% { filter: drop-shadow(0 0 40px rgba(0,212,255,0.5)); }
}
.banner-content p {
    font-size: 1.25rem; color: rgba(255,255,255,0.7);
    max-width: 600px; margin: 0 auto; line-height: 1.9;
    animation: bannerFadeUp 1s ease 0.3s both;
}
@keyframes bannerFadeUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
    .banner-content h1 { font-size: 2.5rem; }
    .banner-content p { font-size: 1.05rem; }
}
@media (max-width: 480px) {
    .banner-content h1 { font-size: 2rem; }
}

/* ===== HERO BANNER — for sub-pages ===== */
.hero {
    min-height: 80vh;
    display: flex; align-items: center; justify-content: center;
    background: #050510;
    position: relative;
    overflow: hidden;
}
.hero-grid {
    position: absolute; bottom: 0; left: -10%; right: 0;
    height: 45%;
    background:
        linear-gradient(transparent 0%, rgba(0,212,255,0.03) 100%),
        repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(0,212,255,0.15) 79px, rgba(0,212,255,0.15) 80px),
        repeating-linear-gradient(0deg, transparent, transparent 79px, rgba(0,212,255,0.08) 79px, rgba(0,212,255,0.08) 80px);
    transform: perspective(500px) rotateX(60deg);
    transform-origin: bottom center;
    animation: gridScroll 3s linear infinite;
}
@keyframes gridScroll {
    0%   { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 0 0, 0 0, 0 80px; }
}
.hero::before {
    content:''; position:absolute; top:0;left:0;right:0;bottom:0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0,212,255,0.08) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(118,75,162,0.1) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(0,212,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.hero::after {
    content:''; position:absolute; top:0;left:0;right:0;bottom:0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.08) 2px, rgba(0,0,0,0.08) 4px);
    pointer-events: none; z-index: 5;
}
.tetris-field {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden; pointer-events: none; z-index: 1;
}
.tblock {
    position: absolute; top: -80px;
    overflow: visible;
    animation: tetrisFall linear infinite;
    transition: filter 0.3s;
}
.tblock svg { display: block; overflow: visible; }
.t-I { color: #00d4ff; filter: drop-shadow(0 0 6px #00d4ff); }
.t-I:hover { filter: brightness(1.3) drop-shadow(0 0 18px #00d4ff); }
.t-O { color: #ffd700; filter: drop-shadow(0 0 6px #ffd700); }
.t-O:hover { filter: brightness(1.3) drop-shadow(0 0 18px #ffd700); }
.t-T { color: #a855f7; filter: drop-shadow(0 0 6px #a855f7); }
.t-T:hover { filter: brightness(1.3) drop-shadow(0 0 18px #a855f7); }
.t-L { color: #f97316; filter: drop-shadow(0 0 6px #f97316); }
.t-L:hover { filter: brightness(1.3) drop-shadow(0 0 18px #f97316); }
.t-Iv{ color: #00d4ff; filter: drop-shadow(0 0 6px #00d4ff); }
.t-Iv:hover { filter: brightness(1.3) drop-shadow(0 0 18px #00d4ff); }
.t-J { color: #3b82f6; filter: drop-shadow(0 0 6px #3b82f6); }
.t-J:hover { filter: brightness(1.3) drop-shadow(0 0 18px #3b82f6); }
.t-S { color: #22c55e; filter: drop-shadow(0 0 6px #22c55e); }
.t-S:hover { filter: brightness(1.3) drop-shadow(0 0 18px #22c55e); }
.t-Z { color: #ef4444; filter: drop-shadow(0 0 6px #ef4444); }
.t-Z:hover { filter: brightness(1.3) drop-shadow(0 0 18px #ef4444); }
@keyframes tetrisFall {
    0%   { transform: translateY(-80px); }
    100% { transform: translateY(110vh); }
}
.controller-art {
    position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
    width: 400px; height: auto;
    z-index: 2; opacity: 0.92;
    filter: drop-shadow(0 0 30px rgba(0,212,255,0.5));
    animation: controllerFloat 6s ease-in-out infinite;
}
@keyframes controllerFloat {
    0%,100% { transform: translateX(-50%) translateY(0) rotate(-2deg); }
    50%      { transform: translateX(-50%) translateY(-12px) rotate(-2deg); }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #00d4ff 40%, #a855f7 80%, #fff 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite, titleGlow 3s ease-in-out infinite;
    line-height: 1.15;
}
@keyframes gradientShift {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@keyframes titleGlow {
    0%,100% { filter: drop-shadow(0 0 20px rgba(0,212,255,0.4)) drop-shadow(0 0 60px rgba(168,85,247,0.2)); }
    50%      { filter: drop-shadow(0 0 40px rgba(0,212,255,0.7)) drop-shadow(0 0 80px rgba(168,85,247,0.4)); }
}
.hero p {
    font-size: 1.15rem; color: rgba(255,255,255,0.75);
    margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto;
    animation: fadeInUp 1s ease 0.4s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #00d4ff, #764ba2);
    color: #fff; padding: 1rem 3rem; border-radius: 50px;
    text-decoration: none; font-weight: 700; font-size: 1.1rem;
    transition: all 0.3s; animation: fadeInUp 1s ease 0.5s both;
    box-shadow: 0 10px 40px rgba(0,212,255,0.35);
}
.cta-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 20px 60px rgba(0,212,255,0.55);
}

/* ===== CONTROLLER GROUP — always centered via flex ===== */
.ctrl-wrap {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ctrl-label {
    margin-top: 8px;
    font-size: 0.7rem;
    color: rgba(0,212,255,0.7);
    letter-spacing: 3px;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
}

/* Hero content — always centered absolutely */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 20px;
}
.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #00d4ff 40%, #a855f7 80%, #fff 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite, titleGlow 3s ease-in-out infinite;
    line-height: 1.2;
}
@keyframes gradientShift {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@keyframes titleGlow {
    0%,100% { filter: drop-shadow(0 0 20px rgba(0,212,255,0.4)) drop-shadow(0 0 60px rgba(168,85,247,0.2)); }
    50%      { filter: drop-shadow(0 0 40px rgba(0,212,255,0.7)) drop-shadow(0 0 80px rgba(168,85,247,0.4)); }
}
.hero-content p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 2rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.4s both;
}
.hero-content .cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #00d4ff, #764ba2);
    color: #fff;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    animation: fadeInUp 1s ease 0.5s both;
    box-shadow: 0 10px 40px rgba(0,212,255,0.35);
}
.hero-content .cta-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 20px 60px rgba(0,212,255,0.55);
}
.hero-quote {
    font-size: 1rem !important;
    color: rgba(0,212,255,0.8) !important;
    margin-top: 2rem !important;
    font-style: italic;
    text-align: center;
    animation: fadeInUp 1s ease 0.8s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hero quote — consistent across all pages */
.hero-quote {
    margin-top: 2rem !important;
    font-size: 1rem !important;
    color: rgba(0,212,255,0.8) !important;
    font-style: italic !important;
    text-align: center !important;
    animation: fadeInUp 1s ease 0.8s both;
}


/* Footer — consistent across all pages */
footer {
    background: #0a0a1a;
    padding: 0;
    margin-top: 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px 30px;
    gap: 40px;
    flex-wrap: wrap;
}
.footer-brand {
    flex: 1;
    min-width: 200px;
}
.footer-brand .logo {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.footer-brand p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    margin: 5px 0 0 0;
}
.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}
.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    padding: 5px 0;
}
.footer-links a:hover {
    color: #00d4ff;
}
.footer-bottom {
    background: #070712;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.03);
}
.footer-bottom p {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    margin: 0;
}
