:root {
    --bg: #030712;
    --bg-grad: radial-gradient(circle at top right, #0f172a, #030712);
    --card: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --accent: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.5);
    --muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --footer-bg: rgba(15, 23, 42, 0.9);
    --glass: blur(12px);
}

body.light-mode {
    --bg: #f8fafc;
    --bg-grad: radial-gradient(circle at top right, #e2e8f0, #f8fafc);
    --card: rgba(255, 255, 255, 0.8);
    --text: #0f172a;
    --accent: #0891b2;
    --accent-glow: rgba(8, 145, 178, 0.3);
    --muted: #64748b;
    --border: rgba(0, 0, 0, 0.05);
    --footer-bg: rgba(241, 245, 249, 0.9);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-grad);
    background-attachment: fixed;
    color: var(--text);
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s;
    overflow-x: hidden;
}

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

header, .search-container, .main-layout, footer { animation: fadeInUp 0.8s ease forwards; }

.main-layout { 
    display: flex; 
    max-width: 1200px; 
    margin: 0 auto; 
    width: 100%; 
    gap: 25px; 
}

.games-content { flex: 1; }

.sidebar { 
    width: 260px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.category-card {
    background: var(--card);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-card:hover { 
    transform: translateX(-5px); 
    border-color: var(--accent); 
}

.category-card.active { 
    background: var(--accent); 
    color: #000; 
    box-shadow: 0 0 20px var(--accent-glow); 
}

.share-sidebar-btn {
    margin-top: 10px;
    background: linear-gradient(45deg, #10b981, #059669) !important;
    color: white !important;
    border: none !important;
}

.file-badge { 
    position: absolute; 
    top: 10px; 
    left: 10px; 
    background: var(--accent); 
    color: #000; 
    padding: 2px 8px; 
    border-radius: 10px; 
    font-weight: 700; 
    font-size: 10px; 
    z-index: 5; 
}

.download-btn { 
    margin-top: 10px; 
    background: var(--accent); 
    color: #000; 
    padding: 10px; 
    border-radius: 12px; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 14px; 
    transition: 0.3s; 
    display: inline-block;
    text-align: center;
}

.download-btn:hover { 
    transform: scale(1.05); 
    box-shadow: 0 0 15px var(--accent-glow); 
}

.theme-toggle {
    position: fixed; 
    top: 20px; 
    right: 20px; 
    z-index: 1000;
    background: var(--card); 
    backdrop-filter: var(--glass); 
    border: 1px solid var(--border); 
    color: var(--text);
    padding: 10px; 
    border-radius: 50%; 
    width: 50px; 
    height: 50px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

h1 { 
    text-align: center; 
    margin: 20px 0 10px; 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    font-weight: 700; 
    background: linear-gradient(to right, #fff, var(--accent)); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.intro-text { 
    text-align: center; 
    max-width: 700px; 
    margin: 0 auto 25px auto; 
    color: var(--muted); 
    font-size: 15px; 
}

.search-container { 
    max-width: 1200px; 
    margin: 0 auto 30px auto; 
    width: 100%; 
}

#gameSearch { 
    width: 100%; 
    max-width: 600px; 
    padding: 15px 30px; 
    border-radius: 50px; 
    border: 1px solid var(--border); 
    background: var(--card); 
    backdrop-filter: var(--glass); 
    color: var(--text); 
    font-size: 16px; 
    outline: none; 
    display: block; 
    margin: 0 auto; 
}

.games { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 24px; 
}

.game-card { 
    background: var(--card); 
    backdrop-filter: var(--glass); 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    padding: 15px; 
    cursor: pointer; 
    transition: 0.4s; 
    position: relative; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    text-align: center; 
}

.game-card:hover { 
    transform: translateY(-10px); 
    border-color: var(--accent); 
}

.thumb { 
    width: 100%; 
    height: 160px; 
    background: rgba(0,0,0,0.2); 
    border-radius: 15px; 
    overflow: hidden; 
    margin-bottom: 12px; 
}

.game-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.title { 
    font-weight: 600; 
    font-size: 17px; 
    margin-bottom: 6px; 
}

.desc { 
    font-size: 13px; 
    color: var(--muted); 
}

#gamePlayer, #submitModal {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: var(--bg); 
    z-index: 9999; 
    display: none; 
    flex-direction: column;
}

#gameIframe { 
    width: 100%; 
    flex: 1; 
    border: none; 
    background: #000; 
}

#closeGame, #closeSubmit {
    padding: 15px; 
    background: #ff4757; 
    color: white; 
    text-align: center; 
    cursor: pointer; 
    font-weight: 700; 
    font-size: 18px; 
    border: none;
}

#submitContent {
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    padding: 40px; 
    text-align: center; 
    max-width: 700px; 
    margin: 0 auto;
}

#submitContent h2 {
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 20px;
}

#submitContent p {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

.submit-link {
    text-decoration: none;
    background: var(--accent);
    color: #000;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 18px;
    transition: 0.3s;
    box-shadow: 0 10px 30px var(--accent-glow);
}

.fav-btn { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    z-index: 10; 
    background: rgba(0,0,0,0.5); 
    width: 35px; 
    height: 35px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 18px; 
    color: #fff; 
    cursor: pointer; 
    border: 1px solid rgba(255,255,255,0.2); 
    transition: 0.3s; 
}

.fav-btn:hover { 
    transform: scale(1.2); 
}

.fav-btn.active { 
    color: #ff4757; 
    background: rgba(255, 71, 87, 0.2); 
    border-color: #ff4757; 
}

#installBtn { 
    display: none; 
    margin: 0 auto 30px auto; 
    padding: 12px 30px; 
    background: linear-gradient(45deg, var(--accent), #0ea5e9); 
    color: #000; 
    border: none; 
    border-radius: 50px; 
    cursor: pointer; 
    font-weight: 700; 
    box-shadow: 0 10px 20px var(--accent-glow); 
    transition: 0.3s; 
}

footer { 
    text-align: center; 
    margin-top: 60px; 
    padding: 60px 20px; 
    background: var(--footer-bg); 
    backdrop-filter: var(--glass); 
    border-radius: 40px 40px 0 0; 
}

.stats-container { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 20px; 
    margin-bottom: 40px;
}

.stat-box { 
    background: var(--card); 
    padding: 20px; 
    border-radius: 20px; 
    border: 1px solid var(--border); 
    min-width: 160px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.stat-label { 
    font-size: 11px; 
    color: var(--muted); 
    text-transform: uppercase; 
    margin-bottom: 10px; 
}

.user-stat-val { 
    font-weight: 700; 
    color: var(--accent); 
    font-size: 18px; 
}

#clock { 
    font-size: 22px; 
    font-weight: 700; 
}

.footer-text {
    margin-top: 20px;
    opacity: 0.6;
    font-size: 12px;
}

.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #000;
    color: #fff;
    padding: 15px 20px;
    border-radius: 16px;
    text-align: center;
    z-index: 10000;
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.cookie-btn {
    padding: 8px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    border: none;
}

.cookie-btn.accept {
    background: #22d3ee;
    color: #000;
}

.cookie-btn.decline {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
}

@media (max-width: 900px) {
    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; overflow-x: auto; order: -1; }
    .games { grid-template-columns: 1fr 1fr; gap: 12px; }
    .cookie-consent { flex-direction: column; text-align: center; }
}

.share-container {
    text-align: center;
    margin-bottom: 30px;
}

.share-btn {
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
}
/* Çerez Uyarısı - Detaylı Versiyon */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #1e293b;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 20px;
    z-index: 10000;
    display: none;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

body.light-mode .cookie-consent {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    color: #0f172a;
}

.cookie-text {
    flex: 2;
    min-width: 200px;
}

.cookie-text strong {
    font-size: 18px;
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
}

.cookie-text p {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.cookie-details-btn {
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.3s;
}

.cookie-details-btn:hover {
    background: var(--accent);
    color: #000;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    border: none;
    font-size: 14px;
}

.cookie-btn.accept {
    background: #22d3ee;
    color: #000;
}

.cookie-btn.decline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

/* Çerez Detay Modalı */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
}

.cookie-modal-content {
    background: var(--card);
    backdrop-filter: var(--glass);
    border-radius: 24px;
    padding: 30px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.cookie-modal-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--accent);
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cookie-table th, .cookie-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cookie-table th {
    color: var(--accent);
    font-weight: 600;
}

.cookie-modal-note {
    font-size: 13px;
    opacity: 0.8;
    margin: 20px 0;
}

.cookie-modal-note a {
    color: var(--accent);
}

.cookie-modal-close {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
}

@media (max-width: 700px) {
    .cookie-consent {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        justify-content: center;
    }
    .cookie-table th, .cookie-table td {
        font-size: 12px;
        padding: 8px;
    }
}
