:root {
    --primary-color: #e63946;
    --primary-hover: #d62839;
    --primary-rgb: 230, 57, 70;
    --secondary-color: #1d3557;
    --accent-color: #457b9d;
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --text-main: #2b2d42;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --input-bg: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="dark"] {
    --primary-color: #ff5a5f;
    --primary-hover: #ff7e82;
    --primary-rgb: 255, 90, 95;
    --secondary-color: #a8dadc;
    --accent-color: #457b9d;
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --input-bg: #0f172a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.main-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: var(--font-body);
}

input, select, textarea {
    width: 100%;
    padding: 14px 18px;
    background-color: var(--input-bg);
    color: var(--text-main);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border-color: rgba(39, 174, 96, 0.2);
}

.alert-danger {
    background-color: rgba(230, 57, 70, 0.1);
    color: #e63946;
    border-color: rgba(230, 57, 70, 0.2);
}

.alert-info {
    background-color: rgba(69, 123, 157, 0.1);
    color: #457b9d;
    border-color: rgba(69, 123, 157, 0.2);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted {
    color: var(--text-muted);
}

.text-danger {
    color: var(--primary-color) !important;
}

.text-success {
    color: #27ae60 !important;
}

.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- RESPONSIVE CONTAINER & BREAKPOINTS (Tablet & Mobil) --- */

/* Tabletler ve Küçük Laptoplar (1024px ve altı) */
@media (max-width: 1024px) {
    .container {
        max-width: 95%; /* Ekranın %95'ini kullan */
        padding: 0 15px;
    }
}

/* Tablet Dikey ve Büyük Telefonlar (768px ve altı) */
@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 15px; /* Standart boşluk, player sayfasında sıfırlanacak */
    }
}


/* --- SKELETON LOADING (Yükleniyor Efekti) --- */
.skeleton {
    background: #e0e0e0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .skeleton {
    background: #2b3544;
}

.skeleton::after {
    content: "";
    display: block;
    position: absolute;
    left: -150px;
    top: 0;
    height: 100%;
    width: 150px;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: load 1.5s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
}

[data-theme="dark"] .skeleton::after {
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
}

@keyframes load {
    from { left: -150px; }
    to   { left: 100%; }
}

/* Kullanım Örnekleri */
.skeleton-text { height: 1em; margin-bottom: 0.5em; width: 80%; }
.skeleton-title { height: 2em; margin-bottom: 1em; width: 60%; }
.skeleton-img { width: 100%; height: 100%; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }

/* =========================================
   PWA & SPLASH SCREEN STYLES (MODERN)
   ========================================= */

.splash-brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif; /* Daha modern font */
    line-height: 0.9; /* Satırları birbirine yaklaştır */
}

.splash-line {
    display: block;
    color: #ffffff;
    font-weight: 900; /* Extra Bold */
    letter-spacing: -0.04em; /* Harfleri sıkıştır (Modern Look) */
    text-transform: uppercase;
    opacity: 0; /* Animasyon için başlangıç */
    text-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Hafif derinlik */
}

/* Animasyon Tanımı: Aşağıdan yukarı ve şeffaflıktan normale */
@keyframes modernFadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.splash-line.line-1 {
    font-size: clamp(2.5rem, 8vw, 4rem); /* Responsive Büyük Boyut */
    animation: modernFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-line.line-2 {
    font-size: clamp(2.5rem, 8vw, 4rem); /* Eşit Büyüklük */
    animation: modernFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards; /* Gecikmeli */
}

/* --- Custom PWA Install Modal (Modern & Şık) --- */
.pwa-install-modal {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    z-index: 10000;
    padding: 15px;
    display: flex;
    justify-content: center;
    transition: bottom 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

.pwa-install-modal.show {
    bottom: 20px; /* Alttan biraz yukarıda dursun (iOS style) */
    pointer-events: auto;
}

.pwa-modal-content {
    background: rgba(255, 255, 255, 0.95); /* Hafif transparan */
    backdrop-filter: blur(12px); /* Blur efekti */
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

[data-theme="dark"] .pwa-modal-content {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

/* İkon Alanı */
.pwa-icon-wrapper img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Yazı Alanı */
.pwa-text-content {
    flex: 1;
}

.pwa-text-content h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--text-main);
}

.pwa-text-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin: 0;
}

/* Buton Grubu - Dikey Mobil Dostu */
.pwa-action-buttons {
    display: flex;
    gap: 8px;
    flex-direction: column; /* Butonlar alt alta daha rahat basılır */
    min-width: 80px;
}

/* Buton Stilleri */
.btn-pwa-install {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s;
}

.btn-pwa-install:active {
    transform: scale(0.95);
}

.btn-pwa-dismiss {
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-align: center;
    padding: 4px;
}

.btn-pwa-dismiss:hover {
    color: var(--text-main);
}

/* Mobil Uyumluluk */
@media (max-width: 480px) {
    .pwa-modal-content {
        flex-direction: row; /* Mobilde yan yana kalsın, sığar */
        padding: 16px;
    }
}