/* ========================================
   GENEL AYARLAR
   ======================================== */

/* Tüm elementlerin margin/padding sıfırla */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Değişkenleri: Light Theme */
:root {
    --bg: #fafafa;          /* Arka plan */
    --text: #0a0a0a;        /* Ana metin */
    --text-muted: #666;     /* Soluk metin */
    --border: #e5e5e5;      /* Kenarlık */
    --hover: #f5f5f5;       /* Hover efekti */
    --accent: #0a0a0a;      /* Vurgu rengi */
}

/* Ana Body Stilleri */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: background-color 0.3s, color 0.3s;
    overflow: hidden;
    user-select: none; /* Metin seçimini engelle */
}

/* Partikül Canvas: Arkaplan Animasyonu */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Tıklamalardan etkilenmesin */
    z-index: 1;
    opacity: 0.6;
}

/* Kişisel Mod: Siber Güvenlik Teması */
body:not(.gamer-mode-active) #particleCanvas {
    opacity: 0.7;
    filter: brightness(0.95) contrast(1.1); /* Network benzeri görünüm */
}

/* Ana İçerik Container */
.wrapper {
    max-width: 320px;
    width: 100%;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 2;
}

/* ========================================
   PROFİL BÖLÜMÜ
   ======================================== */

/* Profil Header */
.header {
    text-align: center;
    margin-bottom: 20px;
    overflow: visible;
    padding: 4px 0; /* LIVE badge için alan */
}

/* Avatar (Profil Resmi) */
.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

/* İsim */
.name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

/* Bio (Meslek/Unvan) */
.bio {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Açıklama Metni */
.description {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 90%;
    margin: 0 auto;
}

/* ========================================
   SOSYAL MEDYA LİNKLERİ
   ======================================== */

/* Link Container */
.links {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

/* Her Bir Link Butonu */
.link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    background: var(--bg);
}

.link span {
    white-space: nowrap;
}

/* Link Hover Efekti */
.link:hover {
    background: var(--hover);
    border-color: var(--accent);
}

/* Link Aktif Durumu (Tıklanma) */
.link:active {
    transform: scale(0.98);
}

/* Link Sol Tarafı (İkon + Metin) */
.link-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* İkonlar */
.link-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
}

.link-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.2s;
    stroke-width: 2;
    flex-shrink: 0;
}

/* Hover'da Ok İkonu Sağa Kayar */
.link:hover .link-arrow {
    transform: translateX(3px);
}

/* ========================================
   DİL DEĞİŞTİRME (CSS İLE)
   ======================================== */

/* Türkçe Varsayılan */
[data-tr]:before {
    content: attr(data-tr);
}

/* İngilizce Seçildiğinde */
.lang-en [data-tr]:before {
    content: attr(data-en);
}

/* Orijinal Metni Gizle */
.lang-tr [data-tr],
.lang-en [data-tr] {
    font-size: 0;
}

/* CSS Content Metnini Göster */
.lang-tr [data-tr]:before,
.lang-en [data-tr]:before {
    font-size: 13px;
}

/* ========================================
   KONTROL BUTONLARI
   ======================================== */

/* Buton Container'ları - Kompakt */
.control-buttons {
    position: fixed;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.language-switcher {
    position: fixed;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 3px;
    z-index: 10;
}

/* Tema Butonu - Kompakt */
.theme-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Kişisel Mod: Siber Güvenlik Teması */
body:not(.gamer-mode-active) .theme-btn {
    border-color: rgba(16, 185, 129, 0.3);
}

body:not(.gamer-mode-active) .theme-btn:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* Mod Değiştirme Butonu - Kompakt */
.mode-toggle-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mode-toggle-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Kişisel Mod: Siber Güvenlik Teması */
body:not(.gamer-mode-active) .mode-toggle-btn {
    border-color: rgba(6, 182, 212, 0.3);
}

body:not(.gamer-mode-active) .mode-toggle-btn:hover {
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

/* Oyuncu Modu Aktifken Buton Stili */
body.gamer-mode-active .mode-toggle-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Dil Butonları - Kompakt */
.lang-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
    background: var(--hover);
    border-color: var(--accent);
    color: var(--text);
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.lang-btn.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

/* Kişisel Mod: Siber Güvenlik Teması - Dil Butonları */
body:not(.gamer-mode-active) .lang-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(6, 182, 212, 0.9) 100%);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* ========================================
   MOD DEĞİŞTİRME
   ======================================== */

/* İçerik Modları: Birini Göster, Diğerini Gizle */
.content-mode {
    display: none;
    animation: fadeOut 0.3s ease-out;
}

.content-mode.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Footer: Moda Göre Göster/Gizle */
.footer-personal,
.footer-gamer {
    display: none;
}

body:not(.gamer-mode-active) .footer-personal {
    display: inline;
}

body.gamer-mode-active .footer-gamer {
    display: inline;
}

/* Footer */
.footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    padding-top: 12px;
}

/* ========================================
   TEMA: DARK MODE
   ======================================== */

body.dark {
    --bg: #0a0a0a;
    --text: #fafafa;
    --text-muted: #999;
    --border: #1f1f1f;
    --hover: #151515;
    --accent: #fafafa;
}

/* ========================================
   OYUNCU MODU TEMA
   ======================================== */

/* Oyuncu Modu Renk Değişkenleri */
body.gamer-mode-active {
    --gamer-accent: #6366f1;      /* Indigo */
    --gamer-accent-light: #8b5cf6; /* Purple */
    --gamer-accent-dark: #4f46e5;
}

/* Oyuncu Modu Link Butonları */
body.gamer-mode-active .link {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

body.gamer-mode-active .link:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25), 0 0 0 1px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

body.gamer-mode-active .link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

/* Platform Özel Renkler */
body.gamer-mode-active .link[href*="discord"]:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2) 0%, rgba(114, 137, 218, 0.2) 100%);
    border-color: rgba(88, 101, 242, 0.6);
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3), 0 0 0 1px rgba(114, 137, 218, 0.2);
}

body.gamer-mode-active .link[href*="kick"]:hover {
    background: linear-gradient(135deg, rgba(37, 217, 94, 0.2) 0%, rgba(0, 255, 135, 0.2) 100%);
    border-color: rgba(37, 217, 94, 0.6);
    box-shadow: 0 4px 16px rgba(37, 217, 94, 0.3), 0 0 0 1px rgba(0, 255, 135, 0.2);
}

body.gamer-mode-active .link[href*="youtube"]:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2) 0%, rgba(204, 0, 0, 0.2) 100%);
    border-color: rgba(255, 0, 0, 0.6);
    box-shadow: 0 4px 16px rgba(255, 0, 0, 0.3), 0 0 0 1px rgba(204, 0, 0, 0.2);
}

body.gamer-mode-active .link[href*="instagram"]:hover {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.2) 0%, rgba(252, 175, 69, 0.2) 100%);
    border-color: rgba(225, 48, 108, 0.6);
    box-shadow: 0 4px 16px rgba(225, 48, 108, 0.3), 0 0 0 1px rgba(252, 175, 69, 0.2);
}

/* Oyuncu Modu İkon Efektleri */
body.gamer-mode-active .link:hover .link-arrow {
    transform: translateX(5px);
    color: var(--gamer-accent);
}

body.gamer-mode-active .link:hover .link-icon {
    transform: scale(1.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Avatar Wrapper (LIVE Badge İçin) */
body.gamer-mode-active .avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
    padding: 0;
}

/* Avatar Border Efekti: Dönen Gradient Halka */
body.gamer-mode-active .avatar {
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    z-index: 2;
}

/* Dış Halka (Dönen Gradient) */
body.gamer-mode-active .avatar::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, 
        rgba(239, 68, 68, 0.9),  /* Kırmızı */
        rgba(99, 102, 241, 0.8),  /* Indigo */
        rgba(139, 92, 246, 0.8),  /* Purple */
        rgba(239, 68, 68, 0.9));
    animation: borderRotate 3s linear infinite;
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
}

/* İç Maskeleme (Avatar'ın Görünmesi İçin) */
body.gamer-mode-active .avatar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: var(--bg);
    z-index: 1;
    pointer-events: none;
}

/* Dark Mode Border Renkleri */
body.dark.gamer-mode-active .avatar::before {
    background: conic-gradient(from 0deg, 
        rgba(239, 68, 68, 1),
        rgba(99, 102, 241, 0.9), 
        rgba(139, 92, 246, 0.9), 
        rgba(239, 68, 68, 1));
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5));
}

/* Light Mode Border Renkleri */
body:not(.dark).gamer-mode-active .avatar::before {
    background: conic-gradient(from 0deg, 
        rgba(220, 38, 38, 0.8),
        rgba(99, 102, 241, 0.6), 
        rgba(139, 92, 246, 0.6),
        rgba(220, 38, 38, 0.8));
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.4));
}

/* LIVE Badge: Canlı Yayın İşareti */
body.gamer-mode-active .live-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4), 0 0 8px rgba(239, 68, 68, 0.25);
    animation: livePulse 2s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.25);
    white-space: nowrap;
    transform: scale(0.95);
}

/* LIVE Badge Animasyonu */
@keyframes livePulse {
    0%, 100% {
        transform: scale(0.95);
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4), 0 0 8px rgba(239, 68, 68, 0.25);
    }
    50% {
        transform: scale(1.0);
        box-shadow: 0 2px 10px rgba(239, 68, 68, 0.6), 0 0 12px rgba(239, 68, 68, 0.4);
    }
}

/* LIVE Dot: Canlı Yayın Göstergesi */
body.gamer-mode-active .live-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg);
    z-index: 10;
    animation: liveDotPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

@keyframes liveDotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
        box-shadow: 0 0 16px rgba(239, 68, 68, 1);
    }
}

/* Border Döndürme Animasyonu */
@keyframes borderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Avatar Hover Efektleri */
body.gamer-mode-active .avatar:hover {
    transform: scale(1.05);
}

body.gamer-mode-active .avatar:hover::before {
    animation-duration: 1.5s;
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.6));
}

body.gamer-mode-active .avatar-wrapper:hover .live-badge {
    animation-duration: 1s;
}

/* Oyuncu Modu Partikül Efekti */
body.gamer-mode-active #particleCanvas {
    opacity: 0.95; /* Daha belirgin */
    filter: brightness(1.1) saturate(1.2); /* Daha canlı renkler */
}

/* ========================================
   RESPONSIVE: MOBİL CİHAZLAR
   ======================================== */

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .wrapper {
        max-width: 300px;
        max-height: calc(100vh - 24px);
    }

    .header {
        margin-bottom: 16px;
    }

    .avatar {
        width: 56px;
        height: 56px;
        margin-bottom: 10px;
    }

    body.gamer-mode-active .live-badge {
        font-size: 7px;
        padding: 2px 4px;
        transform: scale(0.9);
    }

    body.gamer-mode-active .live-dot {
        width: 9px;
        height: 9px;
    }

    .name {
        font-size: 16px;
    }

    .bio {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .description {
        font-size: 11px;
    }

    .links {
        gap: 8px;
        margin-bottom: 12px;
    }

    .link {
        padding: 7px 9px;
        font-size: 12px;
    }

    .link-icon {
        width: 16px;
        height: 16px;
    }

    .link-arrow {
        width: 14px;
        height: 14px;
    }

    .footer {
        font-size: 10px;
        padding-top: 10px;
    }

    .control-buttons {
        top: 10px;
        right: 10px;
        gap: 5px;
    }

    .theme-btn,
    .mode-toggle-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .language-switcher {
        top: 10px;
        left: 10px;
        gap: 2px;
    }

    .lang-btn {
        width: 26px;
        height: 26px;
        font-size: 9px;
        border-radius: 5px;
    }
}

/* Kısa Ekranlar İçin */
@media (max-height: 700px) {
    .header {
        margin-bottom: 12px;
    }

    .avatar {
        width: 52px;
        height: 52px;
    }

    .links {
        gap: 4px;
    }

    .link {
        padding: 9px 12px;
    }
}
