@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Montserrat:wght@600;700;800;900&family=JetBrains+Mono:wght@500&display=swap');
@import url('https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css');

/* --- ANA TEMA DEĞİŞKENLERİ & ORTAK SIFIRLAMA --- */
:root {
    --primary: #ff2a2a;
    --primary-hover: #ff4d4d;
    --primary-glow: rgba(255, 42, 42, 0.4);
    --bg-dark: #030303;
    --bg-panel: rgba(15, 15, 15, 0.6);
    --border-color: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --cn-primary: #ff2a2a;
    --cn-bg: #030303;
    --cn-glass: rgba(255, 255, 255, 0.03);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

::selection { background-color: var(--primary); color: white; }

/* --- TEMA ARKA PLAN ANİMASYONLARI --- */
.bg-grid {
    position: fixed; top: -50vh; left: -50vw; width: 200vw; height: 200vh;
    background-image: linear-gradient(rgba(255, 42, 42, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 42, 42, 0.04) 1px, transparent 1px);
    background-size: 50px 50px; transform: perspective(1000px) rotateX(60deg) translateY(0);
    animation: gridMove 15s linear infinite; z-index: -3; pointer-events: none;
}
@keyframes gridMove {
    0% { transform: perspective(1000px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(1000px) rotateX(60deg) translateY(50px); }
}

.vignette {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 85%);
    z-index: -2; pointer-events: none;
}

.background-cubes { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
.cube {
    position: absolute; background: linear-gradient(135deg, rgba(255, 42, 42, 0.05), transparent);
    border: 1px solid rgba(255, 42, 42, 0.2); box-shadow: 0 0 20px rgba(255, 42, 42, 0.05);
    border-radius: 8px; backdrop-filter: blur(3px); animation: floatUp 25s infinite linear;
}
.cube:nth-child(1) { width: 80px; height: 80px; left: 10%; bottom: -100px; animation-duration: 20s; }
.cube:nth-child(2) { width: 40px; height: 40px; left: 30%; bottom: -100px; animation-duration: 15s; animation-delay: 2s; }
.cube:nth-child(3) { width: 100px; height: 100px; left: 75%; bottom: -100px; animation-duration: 25s; animation-delay: 1s; }
.cube:nth-child(4) { width: 60px; height: 60px; left: 85%; bottom: -100px; animation-duration: 18s; animation-delay: 5s; }
.cube:nth-child(5) { width: 50px; height: 50px; left: 50%; bottom: -100px; animation-duration: 22s; animation-delay: 8s; }
@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; } 90% { opacity: 1; }
    100% { transform: translateY(-120vh) rotate(360deg); opacity: 0; }
}

/* =========================================
   HEADER TASARIMI
========================================= */
.cn-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 90px;
    background: rgba(3, 3, 3, 0.7); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); z-index: 1000;
}

.cn-header-container {
    max-width: 1400px; margin: 0 auto; height: 100%;
    display: flex; justify-content: space-between; align-items: center; padding: 0 40px;
}

.cn-nav { display: flex; gap: 35px; flex: 1; }
.cn-nav-left { justify-content: flex-end; padding-right: 50px; }
.cn-nav-right { justify-content: flex-start; padding-left: 50px; }

.cn-nav-item {
    position: relative; color: #a1a1aa; text-decoration: none;
    font-weight: 600; font-size: 0.95rem; transition: 0.3s;
    display: flex; align-items: center;
}

.cn-cube-indicator {
    width: 8px; height: 8px; background: var(--cn-primary);
    margin-right: 10px; display: inline-block;
    transform: rotate(45deg); opacity: 0; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px var(--cn-primary);
}

.cn-nav-item:hover, .cn-nav-item.active { color: #fff; }
.cn-nav-item:hover .cn-cube-indicator, 
.cn-nav-item.active .cn-cube-indicator { 
    opacity: 1; transform: rotate(225deg); 
}

.cn-logo-wrapper { perspective: 1000px; z-index: 1001; }
.cn-main-logo { display: flex; align-items: center; gap: 15px; text-decoration: none; }

.logo-cube {
    width: 24px; height: 24px; position: relative; transform-style: preserve-3d;
    animation: rotateCube 8s infinite linear;
}

.face {
    position: absolute; width: 24px; height: 24px;
    background: rgba(255, 42, 42, 0.1); border: 1.5px solid var(--cn-primary);
}

.front  { transform: translateZ(12px); }
.back   { transform: rotateY(180deg) translateZ(12px); }
.right  { transform: rotateY(90deg) translateZ(12px); }
.left   { transform: rotateY(-90deg) translateZ(12px); }
.top    { transform: rotateX(90deg) translateZ(12px); }
.bottom { transform: rotateX(-90deg) translateZ(12px); }

@keyframes rotateCube {
    from { transform: rotateX(0) rotateY(0); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

.brand-text { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.6rem; color: #fff; text-transform: uppercase; }
.brand-text span { color: var(--cn-primary); }


/* --- MAIN CONTAINER & HERO --- */
.main-container {
    flex: 1; display: flex; flex-direction: column;
    padding: 120px 20px 80px; z-index: 2; position: relative; width: 100%;
}

.hero-mini {
    position: relative; width: 100%; text-align: center;
    padding: 40px 20px 60px 20px;
    animation: fadeInUp 1s ease forwards;
}
.hero-mini h1 {
    font-family: 'Montserrat', sans-serif; font-size: 3.5rem; font-weight: 900;
    color: #fff; margin-bottom: 20px; text-transform: uppercase;
    text-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.hero-mini h1 span { color: transparent; -webkit-text-stroke: 2px var(--primary); position: relative;  }
.hero-mini p { color: var(--text-muted); font-size: 1.1rem; }
/* --- ARAÇ BÖLÜMÜ --- */
.tool-section { padding: 0 20px 50px; }
.tool-container { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }

/* Arama Alanı */
.search-area {
    position: relative; max-width: 700px; width: 100%; height: 65px; margin: 0 auto;
    background: rgba(10, 10, 10, 0.8); border: 1px solid var(--border-color);
    border-radius: 60px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: 0.3s;
    backdrop-filter: blur(10px);
}
.search-area:focus-within { border-color: var(--primary); box-shadow: 0 0 20px var(--primary-glow); }

.search-icon-box {
    position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
    color: #666; font-size: 1.2rem; pointer-events: none;
}
.search-input {
    width: 100%; height: 100%; background: transparent; border: none; color: #fff;
    font-size: 1.1rem; outline: none; padding-left: 55px; padding-right: 160px;
}
.search-btn {
    position: absolute; right: 6px; top: 6px; bottom: 6px; min-width: 140px;
    background: var(--primary); color: #fff; border: none; border-radius: 50px;
    font-weight: 800; cursor: pointer; font-size: 0.95rem; text-transform: uppercase;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s;
}
.search-btn:hover { background: var(--primary-hover); transform: scale(1.02); box-shadow: 0 5px 15px var(--primary-glow); }

/* Grid & Render Alanı */
.viewer-grid {
    display: none; grid-template-columns: 1fr 1fr; gap: 40px;
    background: linear-gradient(160deg, rgba(20,20,20,0.8), rgba(5,5,5,0.95));
    border: 1px solid var(--border-color); border-radius: 24px; padding: 40px;
    backdrop-filter: blur(20px); box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    animation: fadeInUp 0.5s ease;
}

.preview-col { display: flex; flex-direction: column; gap: 20px; }
.canvas-wrapper {
    background: rgba(0,0,0,0.5); border: 1px solid var(--border-color); border-radius: 16px;
    overflow: hidden; position: relative; height: 500px; display: flex; flex-direction: column;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}
#skin_container { width: 100%; height: 100%; cursor: grab; outline: none; }
#skin_container:active { cursor: grabbing; }

.controls-bar {
    display: flex; gap: 8px; justify-content: center; padding: 10px;
    background: rgba(0,0,0,0.6); border-radius: 12px; border: 1px solid var(--border-color);
}
.ctrl-btn {
    width: 45px; height: 45px; background: rgba(30,30,30,0.6); border: 1px solid #333; color: #aaa;
    border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.2s; font-size: 1.2rem; position: relative;
}
.ctrl-btn:hover { background: #333; color: #fff; transform: translateY(-2px); }
.ctrl-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 5px 15px var(--primary-glow); }

.ctrl-btn::after {
    content: attr(title); position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%);
    background: #000; color: #fff; padding: 5px 10px; border-radius: 4px; font-size: 0.7rem;
    white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.2s; font-weight: 700;
}
.ctrl-btn:hover::after { opacity: 1; bottom: 130%; }

/* Sağ Panel Bilgiler */
.info-panel { display: flex; flex-direction: column; gap: 25px; justify-content: center; }
.player-header { display: flex; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.player-head-img { width: 80px; height: 80px; border-radius: 12px; border: 2px solid #444; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.player-name { font-size: 2.5rem; font-weight: 900; font-family: 'Montserrat', sans-serif; color: #fff; }

.data-group label { display: block; color: var(--text-muted); font-weight: 700; margin-bottom: 8px; font-size: 0.85rem; text-transform: uppercase; }
.copy-box { display: flex; background: rgba(0,0,0,0.5); border: 1px solid #333; border-radius: 10px; overflow: hidden; }
.copy-input { flex: 1; background: transparent; border: none; padding: 15px; color: #ccc; font-family: 'JetBrains Mono', monospace; outline: none; }
.copy-btn { width: 50px; background: rgba(20,20,20,0.8); border: none; border-left: 1px solid #333; color: #fff; cursor: pointer; transition: 0.2s; }
.copy-btn:hover { background: var(--primary); }

.action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 10px; }
.action-link {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px; border-radius: 10px; text-decoration: none; font-weight: 800;
    transition: 0.3s; text-transform: uppercase; font-size: 0.9rem;
}
.dl-btn { background: #fff; color: #000; }
.dl-btn:hover { background: #e0e0e0; transform: translateY(-3px); }
.ext-btn { background: rgba(20,20,20,0.8); color: #fff; border: 1px solid #333; }
.ext-btn:hover { border-color: #666; transform: translateY(-3px); }

/* Yükleniyor ve Animasyonlar */
.loading-box { text-align: center; padding: 50px; display: none; }
.loading-spinner { font-size: 3rem; color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
/* =========================================
   FOOTER TASARIMI
========================================= */
.cn-footer { background: #050505; border-top: 1px solid rgba(255, 255, 255, 0.03); padding-top: 80px; z-index: 5; position: relative; }

.footer-top-cta { max-width: 1200px; margin: -140px auto 60px; padding: 0 20px; }
.cta-card {
    background: linear-gradient(135deg, rgba(255, 42, 42, 0.1) 0%, rgba(10, 10, 10, 0.8) 100%);
    border: 1px solid rgba(255, 42, 42, 0.2); backdrop-filter: blur(20px);
    border-radius: 24px; padding: 40px; display: flex; justify-content: space-between; align-items: center;
}
.cta-text h3 { font-size: 1.8rem; color: #fff; margin-bottom: 8px; }
.cta-text p { color: #a1a1aa; }
.cta-button {
    background: var(--cn-primary); color: #fff; text-decoration: none; padding: 15px 35px;
    border-radius: 12px; font-weight: 700; transition: 0.3s; box-shadow: 0 10px 20px rgba(255, 42, 42, 0.2);
}
.cta-button:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(255, 42, 42, 0.4); }

.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 80px; padding: 0 20px 60px; }
.footer-brand-info p { color: #71717a; margin-top: 15px; max-width: 300px; }
.footer-group h4 { color: #fff; margin-bottom: 25px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-group ul { list-style: none; padding: 0; }
.footer-group li { margin-bottom: 12px; }
.footer-group a { color: #71717a; text-decoration: none; transition: 0.3s; }
.footer-group ul li a::before { content: '›'; color: var(--cn-primary); font-size: 1.2rem; margin-right: 8px; opacity: 0; transform: translateX(-10px); transition: all 0.3s ease; }
.footer-group ul li a:hover {color:#a41010; padding-left: 5px; transform: translateX(5px); }
.footer-group ul li a:hover::before { opacity: 1; transform: translateX(0); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.05); padding: 30px 20px; }
.bottom-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; color: #52525b; font-size: 0.9rem; }
.system-status { display: flex; align-items: center; gap: 10px; color: #10b981; font-weight: 700; }
.status-pulse { width: 8px; height: 8px; background: #10b981; border-radius: 50%; animation: statusPulse 2s infinite; }

/* =========================================
   RESPONSIVE & MOBİL HAMBURGER MENÜ
========================================= */

.cn-hamburger { background: none; border: none; cursor: pointer; display: none; padding: 10px; z-index: 1002; }
.hb-box { width: 30px; height: 24px; position: relative; }
.hb-inner, .hb-inner::before, .hb-inner::after { width: 30px; height: 2px; background: #fff; position: absolute; transition: 0.3s; }
.hb-inner { top: 50%; transform: translateY(-50%); }
.hb-inner::before { content: ""; top: -8px; }
.hb-inner::after { content: ""; top: 8px; }

.cn-hamburger.is-active .hb-inner { background: transparent; }
.cn-hamburger.is-active .hb-inner::before { transform: rotate(45deg); top: 0; }
.cn-hamburger.is-active .hb-inner::after { transform: rotate(-45deg); top: 0; }

.cn-mobile-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(3, 3, 3, 0.98); 
    backdrop-filter: blur(15px); z-index: 999;
    display: flex; align-items: center; justify-content: center;
    transform: translateX(100%); transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}
.cn-mobile-overlay.is-open { transform: translateX(0); }

.overlay-content { width: 100%; padding-top: 60px; } /* Header alanından kaçınmak için */
.mobile-nav-list { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.mobile-nav-list a {
    color: #fff; font-size: 1.8rem; font-weight: 800; text-decoration: none;
    text-transform: uppercase; transition: 0.3s;
}
.mobile-nav-list a:hover { color: var(--cn-primary); }
.m-divider { width: 40px; height: 2px; background: rgba(255, 255, 255, 0.1); margin: 10px 0; }
.m-special { color: var(--cn-primary) !important; }

/* 992px altı (Tabletler) */
@media (max-width: 992px) {
    .cn-nav, .cn-nav-right { display: none; }
    .cn-hamburger { display: block; }
    .cn-header-container { justify-content: space-between; }
    /* Tabletlerde hala ortalı durabilir, alan var */
    .cn-logo-wrapper { position: absolute; left: 50%; transform: translateX(-50%); }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .footer-brand-info p { margin: 15px auto; }
}

/* 768px altı (Mobil Cihazlar - Logoyu sola yasladık, üst üste binmeyi çözdük) */
@media (max-width: 768px) {
    .cn-logo-wrapper { position: static; transform: none; } /* Sorunu çözen temel kod */
    .hero-title { font-size: 3rem; }
    .hero-section { margin-bottom: 40px; }
    .beta-info-box { padding: 20px; }
    .action-buttons { flex-direction: column; width: 100%; }
    .btn { justify-content: center; width: 100%; }
    .discord-section { padding: 0 15px; }
    .cta-card { flex-direction: column; text-align: center; gap: 20px; }
    .section-header { flex-direction: column; gap: 15px; text-align: center; }
}

@media (max-width: 480px) {
    .cn-header-container { padding: 0 20px; }
    .brand-text { font-size: 1.3rem; }
    .hero-title { font-size: 2.2rem; }
    .status-badge { font-size: 0.75rem; padding: 6px 15px; }
    .beta-info-box p { font-size: 0.95rem; }
    .bottom-container { flex-direction: column; gap: 15px; }
}
/* Mobil Uyum */
@media (max-width: 900px) {
    .viewer-grid { grid-template-columns: 1fr; }
    .hero-mini h1 { font-size: 2.5rem; }
    .canvas-wrapper { height: 350px; }
}
@media (max-width: 768px) {
    .search-area { height: auto; border-radius: 20px; display: flex; flex-direction: column; padding: 10px; }
    .search-icon-box { display: none; }
    .search-input { padding: 15px; text-align: center; border-bottom: 1px solid #333; width: 100%; }
    .search-btn { position: relative; right: auto; top: auto; bottom: auto; width: 100%; height: 50px; margin-top: 10px; }
    .header-nav { display: none; /* Mobilde sadeleştirme */ }
}
/* --- POPÜLER OYUNCULAR (EKLEME) --- */
.popular-players {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: -15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease forwards;
}
.popular-players span {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}
.pop-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}
.pop-btn:hover {
    background: rgba(255, 42, 42, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 42, 42, 0.2);
    transform: translateY(-2px);
}

/* --- KILAVUZ --- */
.guide-section { width: 100%; max-width: 1000px; margin-top: 80px; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 50px; }
.guide-section h2 { text-align: center; font-size: 2rem; margin-bottom: 50px; font-family: 'Montserrat', sans-serif; text-transform: uppercase; }

/* Grid yapısını otomatik esneyecek şekilde ayarladık */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; align-items: stretch; }

.guide-step { 
    background: rgba(20, 20, 20, 0.5); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 16px; 
    padding: 30px 25px 25px; 
    position: relative; 
    text-align: center;
    display: flex; 
    flex-direction: column; /* Kartı dikey hizalama moduna aldık */
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.guide-step:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 42, 42, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.step-number {
    position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
    background: var(--primary); width: 40px; height: 40px; display: flex; align-items: center;
    justify-content: center; border-radius: 50%; font-weight: 800; font-size: 1.1rem; color: #fff;
    box-shadow: 0 5px 15px rgba(255, 42, 42, 0.4); border: 3px solid var(--bg-dark);
}

/* Resimleri taşıyan çerçeve: Boyutları sabitliyoruz */
.step-image-wrapper { 
    width: 100%; 
    height: 160px; /* Tüm resimlerin sabit yüksekliği */
    margin-bottom: 20px; 
    border-radius: 8px; 
    overflow: hidden; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
}

/* Görseli deforme etmeden çerçeveye sığdır (İşte sorunu çözen kod) */
.step-image-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.5s ease; 
}

.guide-step:hover .step-image-wrapper img { transform: scale(1.08); }

/* Metin alanı: Esneyerek boşluğu doldurur ve kartları eşit boyda tutar */
.step-content { flex-grow: 1; display: flex; flex-direction: column; }
.step-content h3 { margin-bottom: 12px; font-size: 1.25rem; font-family: 'Montserrat', sans-serif; }
.step-content p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 0; }

/* Mobil Uyum (Kılavuz ve Popüler Oyuncular için) */
@media (max-width: 900px) {
    .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .popular-players { margin-top: 10px; }
    .guide-title { font-size: 1.8rem; }
}
