/* ==========================================================================
   DEĞİŞKENLER VE TEMEL AYARLAR
   ========================================================================== */
:root {
    --gold: #ffcd3c;
    --gold-glow: rgba(255, 205, 60, 0.4);
    --bg-dark: #030308;
    --accent-blue: #00f2ff;
    --accent-blue-glow: rgba(0, 242, 255, 0.3);
    --font-main: 'Rajdhani', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    background: url('background_images/home_bg.png') center/cover fixed no-repeat;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;

}

.scanline {
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.4;
}

/* ==========================================================================
   VIEWPORT VE ARKA PLAN YAPISI
   ========================================================================== */
.app-viewport {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
}

.app-viewport::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at 50% 50%, black 20%, transparent 85%);
    z-index: -1;
    pointer-events: none;
}

.scale-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, rgba(5, 12, 24, 0.5) 0%, rgba(2, 4, 8, 0.75) 100%);
}

.main-container {
    flex: 1 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 90px 20px 90px 20px;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* ==========================================================================
   ANA PANEL (Fraksiyon Grupları Bu Kutunun Çevresine Kilitli)
   ========================================================================== */
.main-section {
    text-align: center;
    padding: 44px 56px;
    background: rgba(2, 4, 12, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 255, 0.15);
    border-radius: 24px;
    max-width: 620px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    z-index: 3;
}

/* ==========================================================================
   FRAKSİYON KAPSAYICILARI VE KATMAN AYARLARI (ZOOM KORUMASI)
   ========================================================================== */
.faction-group {
    position: absolute;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-layer {
    position: absolute;
    pointer-events: none;
}

/* Katman öncelikleri ve genel filtre efektleri */
.faction-planet {
    z-index: -2;
    width: 200px;
    filter: drop-shadow(0 0 20px rgba(0, 242, 255, 0.15));
    opacity: 0.6;
}

.faction-ship {
    z-index: -1;
}

/* --------------------------------------------------------------------------
   1. GRUP: VELYSSAR (Sağ Üst Konumlandırma ve Animasyon)
   -------------------------------------------------------------------------- */
.group-velyssar {
    top: -130px;
    right: -250px;
    width: 290px;
    height: 290px;
    animation: floatVelyssarGroup 9s ease-in-out infinite;
}
.group-velyssar .faction-ship {
    width: 290px;
    transform: rotate(-25deg);
    filter: drop-shadow(0 0 35px rgba(255, 205, 60, 0.25)) brightness(0.95);
}
.group-velyssar .faction-planet {
    transform: translate(-70px, -45px) scale(1.3);
    filter: drop-shadow(0 0 40px rgba(255, 205, 60, 0.25));
    opacity: 0.55;
}

/* --------------------------------------------------------------------------
   2. GRUP: SYNARI (Sol Alt Konumlandırma ve Animasyon)
   -------------------------------------------------------------------------- */
.group-synari {
    bottom: -100px;
    left: -270px;
    width: 340px;
    height: 340px;
    animation: floatSynariGroup 10s ease-in-out infinite;
}
.group-synari .faction-ship {
    width: 340px;
    transform: rotate(-12deg);
    filter: drop-shadow(0 0 30px rgba(0, 242, 255, 0.2)) brightness(0.9);
}
.group-synari .faction-planet {
    transform: translate(-70px, -40px) scale(1.2);
    opacity: 0.5;
}

/* --------------------------------------------------------------------------
   3. GRUP: SOLARI (Sağ Alt Konumlandırma ve Animasyon)
   -------------------------------------------------------------------------- */
.group-solari {
    bottom: -115px;
    right: -285px;
    width: 360px;
    height: 360px;
    animation: floatSolariGroup 11s ease-in-out infinite;
}
.group-solari .faction-ship {
    width: 360px;
    transform: rotate(12deg) scaleX(-1);
    filter: drop-shadow(0 0 30px rgba(0, 242, 255, 0.2)) brightness(0.9);
}
.group-solari .faction-planet {
    transform: translate(75px, -55px) scale(1.25);
    opacity: 0.5;
}

/* GRUP SÜZÜLME ANİMASYONLARI (Gemi ve Gezegen Senkronize Süzülür) */
@keyframes floatVelyssarGroup {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, 15px) scale(1.03); }
}
@keyframes floatSynariGroup {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, -20px) scale(1.02); }
}
@keyframes floatSolariGroup {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -20px) scale(1.02); }
}

/* ==========================================================================
   HUD VE DİĞER DETAYLAR
   ========================================================================== */
.hud-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent-blue);
    opacity: 0.6;
}
.hud-corner.top-left { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.hud-corner.top-right { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.hud-corner.bottom-left { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.hud-corner.bottom-right { bottom: 12px; right: 12px; border-left: none; border-top: none; }

.logo-wrapper {
    position: relative;
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo {
    width: 100%;
    max-width: 190px;
    animation: floatLogo 5s ease-in-out infinite;
    z-index: 2;
}

.orbit-system {
    position: absolute;
    top: 50%;
    left: 70%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    pointer-events: none;
    z-index: 1;
}

.spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform-origin: -95px center;
    animation: orbit-rotate linear infinite;
}

.spark.red { background: #ff4d4d; box-shadow: 0 0 15px #ff4d4d; animation-duration: 5s; }
.spark.gold { background: var(--gold); box-shadow: 0 0 15px var(--gold); animation-duration: 8s; }
.spark.green { background: #07de27; box-shadow: 0 0 15px #07b70a; animation-duration: 11s; }

@keyframes orbit-rotate { to { transform: rotate(360deg); } }
@keyframes floatLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 3.6vw, 2.8rem);
    font-weight: 900;
    letter-spacing: 8px;
    background: linear-gradient(to bottom, #ffffff 40%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 32px;
    letter-spacing: 1.5px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* BUTTONS */
.cta-group { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.btn {
    position: relative;
    padding: 13px 34px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 2.5px;
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
    transition: var(--transition-fast);
}

.btn-primary { background: var(--gold); color: #000; }
.btn-primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 0 25px var(--gold-glow); }
.btn-secondary { background: rgba(0, 242, 255, 0.03); color: var(--accent-blue); border: 1px solid rgba(0, 242, 255, 0.4); }
.btn-secondary:hover { background: rgba(0, 242, 255, 0.12); color: #fff; border-color: var(--accent-blue); transform: translateY(-2px); box-shadow: 0 0 25px var(--accent-blue-glow); }

/* STATUS & FOOTER */
.status-bar {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    gap: 18px;
    background: rgba(2, 4, 10, 0.85);
    padding: 6px 14px;
    border-right: 3px solid var(--accent-blue);
    border-left: 3px solid var(--gold);
    font-size: 0.82rem;
    font-family: var(--font-heading);
    z-index: 100;
}
.status-bar .online { font-size: 0.82rem; color: #4dff88; font-weight: bold; }
.status-bar .sector { font-size: 0.82rem; color: var(--accent-blue); }
.status-bar .total-count { font-size: 0.82rem; color: #ffcd3c; font-weight: bold; }
.status-bar .online-count { font-size: 0.82rem; color: #4dff88; font-weight: bold; }

/* ==========================================================================
   LANGUAGE SWITCHER — Dairesel Bayrak Seçici (HUD Stili)
   ========================================================================== */
.lang-switcher {
    position: absolute;
    top: 56px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    background: rgba(2, 4, 10, 0.55);
    border: 1px solid rgba(0, 242, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    z-index: 100;
}

.lang-icon {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
    filter: grayscale(55%) brightness(0.85);
    opacity: 0.75;
    transition: var(--transition-fast);
}

.lang-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
}

.lang-icon:hover {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    border-color: var(--accent-blue);
    transform: translateY(-3px) scale(1.12);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.35),
        0 0 16px var(--accent-blue-glow);
}

.lang-icon.active {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    border-color: var(--gold);
    transform: scale(1.08);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.35),
        0 0 14px var(--gold-glow),
        0 0 0 1px var(--gold) inset;
}

.lang-icon.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 6px var(--gold);
}

.lang-icon::before {
    content: attr(data-label);
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(2, 4, 10, 0.95);
    color: var(--accent-blue);
    font-family: var(--font-heading);
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    padding: 4px 9px;
    border-radius: 4px;
    border: 1px solid rgba(0, 242, 255, 0.25);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.lang-icon:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .lang-switcher {
        top: 58px;
        right: 12px;
        gap: 8px;
        padding: 5px 8px;
    }
    .lang-icon { width: 24px; height: 24px; }
    .lang-icon::before { display: none; }
}

/* ==========================================================================
   FOOTER — Sci-Fi HUD Alt Bar
   ========================================================================== */
footer {
    background: linear-gradient(180deg, rgba(2, 3, 7, 0.85) 0%, rgba(2, 3, 7, 0.98) 100%);
    padding: 14px 30px;
    border-top: 1px solid rgba(0, 242, 255, 0.15);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
}

footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0.6;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
}

footer p {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    font-family: var(--font-main);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

footer p::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4dff88;
    box-shadow: 0 0 6px #4dff88, 0 0 10px #4dff88;
    animation: footerPulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes footerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.social-links {
    display: flex;
    gap: 10px;
}

.s-link {
    position: relative;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
    transition: var(--transition-fast);
}

.s-link:hover {
    background: var(--accent-blue);
    color: #000;
    border-color: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px var(--accent-blue-glow);
}

@media (max-width: 768px) {
    footer { padding: 12px 20px; }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    footer p {
        font-size: 0.62rem;
        letter-spacing: 1px;
    }

    .social-links { gap: 8px; }

    .s-link {
        font-size: 0.62rem;
        padding: 5px 11px;
    }
}

/* ==========================================================================
   RESPONSIVE & ZOOM STABILITY (KIRILMA NOKTALARI)
   ========================================================================== */

/* Yeni ara kademe: yaygın 1440-1600px laptop ekranları için hafif küçültme */
@media (max-width: 1600px) {
    .group-synari { left: -200px; width: 300px; height: 300px; bottom: -80px; }
    .group-synari .faction-ship { width: 300px; }
    .group-synari .faction-planet { width: 130px; }

    .group-solari { right: -210px; width: 320px; height: 320px; bottom: -90px; }
    .group-solari .faction-ship { width: 320px; }
    .group-solari .faction-planet { width: 140px; }

    .group-velyssar { right: -190px; width: 250px; height: 250px; top: -100px; }
    .group-velyssar .faction-ship { width: 250px; }
    .group-velyssar .faction-planet { width: 120px; }
}

@media (max-width: 1400px) {
    .group-synari { left: -150px; width: 260px; height: 260px; bottom: -70px; }
    .group-synari .faction-ship { width: 260px; }
    .group-synari .faction-planet { width: 110px; }

    .group-solari { right: -160px; width: 270px; height: 270px; bottom: -70px; }
    .group-solari .faction-ship { width: 270px; }
    .group-solari .faction-planet { width: 115px; }

    .group-velyssar { right: -150px; width: 220px; height: 220px; top: -90px; }
    .group-velyssar .faction-ship { width: 220px; }
    .group-velyssar .faction-planet { width: 100px; }
}

@media (max-width: 1100px) {
    .group-synari { left: -100px; bottom: -80px; opacity: 0.35; }
    .group-solari { right: -100px; bottom: -80px; opacity: 0.35; }
    .group-velyssar { right: -100px; top: -100px; opacity: 0.35; }
}

@media (max-width: 768px) {
    .main-container { padding-bottom: 130px; padding-top: 70px; }
    .main-section { padding: 34px 20px; }
    
    .group-synari, .group-solari { display: none; }
    
    .group-velyssar { width: 180px; height: 180px; top: -110px; right: -20px; opacity: 0.4; }
    .group-velyssar .faction-ship { width: 180px; }
    .group-velyssar .faction-planet { width: 85px; transform: translate(-10px, -10px); }

    .orbit-system { display: none; }
    .cta-group { flex-direction: column; width: 100%; }
    .footer-inner { flex-direction: column; gap: 12px; }
}

/* ==========================================================================
   HIGH-END SCI-FI GLITCH TEXT (PROFESYONEL ORBITRON BAŞLIK)
   ========================================================================== */
.glitch-text {
    font-family: var(--font-heading), 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1.7rem, 3.6vw, 2.8rem);
    text-transform: uppercase;
    position: relative;
    letter-spacing: 8px;
    display: inline-block;
    
    background: linear-gradient(to bottom, #ffffff 40%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 205, 60, 0.2), 0 0 40px rgba(0, 242, 255, 0.1);
    
    will-change: transform;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #030308;
    -webkit-background-clip: text;
    pointer-events: none;
}

.glitch-text::before {
    left: 3px;
    text-shadow: -3px 0 var(--accent-blue), 0 0 10px var(--accent-blue);
    clip-path: inset(80% 0 0 0);
    animation: sciFiGlitchCyan 4s infinite steps(2, end);
    opacity: 0;
}

.glitch-text::after {
    left: -3px;
    text-shadow: 3px 0 var(--gold), 0 0 10px var(--gold);
    clip-path: inset(0 0 80% 0);
    animation: sciFiGlitchGold 4s infinite steps(2, end);
    opacity: 0;
}

/* ==========================================================================
   PROFESYONEL PARAZİT ANİMASYONLARI (steps() ile anlık sıçramalar sağlar)
   ========================================================================== */
@keyframes sciFiGlitchCyan {
    0%, 85% { clip-path: inset(100% 0 0 0); opacity: 0; transform: scale(1); }
    86%     { clip-path: inset(12% 0 55% 0); opacity: 1; transform: skewX(-5deg); }
    88%     { clip-path: inset(70% 0 5% 0); opacity: 0.8; transform: skewX(2deg); }
    90%     { clip-path: inset(30% 0 40% 0); opacity: 1; transform: translate(-2px, 1px); }
    92%     { clip-path: inset(100% 0 0 0); opacity: 0; }
    94%     { clip-path: inset(55% 0 12% 0); opacity: 1; transform: skewX(10deg) scaleY(1.1); }
    96%     { clip-path: inset(5% 0 85% 0); opacity: 0.9; transform: translate(3px, -1px); }
    98%, 100% { clip-path: inset(100% 0 0 0); opacity: 0; transform: scale(1); }
}

@keyframes sciFiGlitchGold {
    0%, 82% { clip-path: inset(0 0 100% 0); opacity: 0; transform: scale(1); }
    83%     { clip-path: inset(40% 0 20% 0); opacity: 1; transform: skewX(5deg); }
    85%     { clip-path: inset(10% 0 75% 0); opacity: 0.7; transform: translate(2px, -2px); }
    87%     { clip-path: inset(0 0 100% 0); opacity: 0; }
    91%     { clip-path: inset(82% 0 5% 0); opacity: 1; transform: skewX(-8deg) scaleY(0.9); }
    93%     { clip-path: inset(25% 0 60% 0); opacity: 0.9; transform: translate(-3px, 2px); }
    95%, 100% { clip-path: inset(0 0 100% 0); opacity: 0; transform: scale(1); }
}