/* ==========================================
   EMO Basından Görünüm - Frontend Styles
   Crystal Light Theme - Billur Tasarım
   ========================================== */

/* ===== CSS Variables ===== */
:root {
    /* Colors - Light Crystal Theme */
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.92);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --bg-input: rgba(255, 255, 255, 0.9);

    /* Accent Colors */
    --accent-primary: #2563eb;
    --accent-primary-light: #3b82f6;
    --accent-primary-hover: #1d4ed8;
    --accent-secondary: #7c3aed;
    --accent-gold: #d97706;
    --accent-green: #059669;
    --accent-red: #dc2626;
    --accent-cyan: #0891b2;

    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-accent: #2563eb;

    /* Borders */
    --border-color: rgba(148, 163, 184, 0.2);
    --border-hover: rgba(37, 99, 235, 0.3);
    --border-glass: rgba(255, 255, 255, 0.5);

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #dbeafe 0%, #ede9fe 40%, #fce7f3 70%, #dbeafe 100%);
    --gradient-primary: linear-gradient(135deg, #3b82f6, #2563eb);
    --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
    --gradient-purple: linear-gradient(135deg, #8b5cf6, #7c3aed);
    --gradient-green: linear-gradient(135deg, #10b981, #059669);
    --gradient-crystal: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(219,234,254,0.6));

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.08);
    --shadow-glow-blue: 0 4px 24px rgba(37, 99, 235, 0.15);

    /* Layout */
    --container-max: 1320px;
    --navbar-height: 70px;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 20px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
}

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

a:hover {
    color: var(--accent-primary-hover);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
    background: #1e3a5f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    background: #162d4a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
}

.brand-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: #ffffff;
}

.brand-subtitle {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.btn-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-admin:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    padding: calc(var(--navbar-height) + 60px) 0 50px;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 10% 40%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(245, 158, 11, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
    color: var(--text-primary);
}

.hero-title-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glass);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.85);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-primary::before { background: var(--gradient-green); }
.stat-card-blue::before { background: var(--gradient-primary); }
.stat-card-purple::before { background: var(--gradient-purple); }
.stat-card-gold::before { background: var(--gradient-gold); }

.stat-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card-primary .stat-icon { background: rgba(5, 150, 105, 0.1); color: var(--accent-green); }
.stat-card-blue .stat-icon { background: rgba(37, 99, 235, 0.1); color: var(--accent-primary); }
.stat-card-purple .stat-icon { background: rgba(124, 58, 237, 0.1); color: var(--accent-secondary); }
.stat-card-gold .stat-icon { background: rgba(217, 119, 6, 0.1); color: var(--accent-gold); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* ===== Content Section ===== */
.content-section {
    padding: 40px 0 80px;
    position: relative;
}

/* ===== Filter Panel ===== */
.filter-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-glass);
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-title i {
    color: var(--accent-primary);
}

.filter-body {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group-search {
    grid-column: span 1;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.filter-select:focus,
.filter-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
}

.filter-select option {
    background: #fff;
    color: var(--text-primary);
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.filter-search {
    padding-left: 40px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: #fff;
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* ===== Results Header ===== */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.results-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.results-count span {
    font-weight: 700;
    color: var(--text-primary);
}

.results-view-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* ===== Results Table ===== */
.results-table-wrapper {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table thead {
    background: rgba(37, 99, 235, 0.04);
}

.results-table th {
    padding: 14px 18px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.results-table td {
    padding: 14px 18px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    vertical-align: middle;
}

.result-row {
    transition: var(--transition-fast);
}

.result-row:hover {
    background: rgba(37, 99, 235, 0.03);
}

.result-row:last-child td {
    border-bottom: none;
}

.th-tarih { width: 110px; }
.th-mecra { width: 80px; }
.th-medya { width: 170px; }
.th-erisim { width: 90px; text-align: right; }

.td-erisim { text-align: right; }

/* Badges */
.date-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mecra-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mecra-basın, .mecra-basin {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

.mecra-tv {
    background: rgba(124, 58, 237, 0.08);
    color: #7c3aed;
}

.mecra-diger {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
}

.erisim-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(217, 119, 6, 0.08);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--accent-gold);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Haber Link */
.haber-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    display: inline;
    line-height: 1.5;
}

.haber-link:hover {
    color: var(--accent-primary);
}

.link-icon {
    font-size: 0.7rem;
    margin-left: 6px;
    opacity: 0;
    transform: translateY(-2px);
    transition: var(--transition);
    color: var(--accent-primary);
}

.haber-link:hover .link-icon {
    opacity: 1;
}

/* ===== Card View ===== */
.results-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.result-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glass);
}

.result-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.85);
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.result-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 12px;
}

.card-title a {
    color: var(--text-primary);
}

.card-title a:hover {
    color: var(--accent-primary);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.card-medya {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Pagination ===== */
.pagination-wrapper {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    padding: 0 12px;
    font-family: 'Inter', sans-serif;
}

.page-btn:hover {
    background: #fff;
    border-color: var(--border-hover);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.page-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-glow-blue);
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-ellipsis {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* ===== Loading ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(240, 244, 248, 0.6);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: rgba(255,255,255,0.9);
    padding: 32px 48px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(37, 99, 235, 0.15);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Footer ===== */
.footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.footer-brand .brand-logo {
    height: 30px;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-body {
        grid-template-columns: repeat(3, 1fr);
    }

    .filter-group-search {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero-section {
        padding: calc(var(--navbar-height) + 32px) 0 32px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .filter-body {
        grid-template-columns: 1fr 1fr;
    }

    .filter-group-search {
        grid-column: span 2;
    }

    .results-table-wrapper {
        overflow-x: auto;
    }

    .results-table {
        min-width: 700px;
    }

    .results-cards {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .navbar-actions span {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-body {
        grid-template-columns: 1fr;
    }

    .filter-group-search {
        grid-column: span 1;
    }

    .results-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

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

.stat-card {
    animation: fadeInUp 0.6s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.filter-panel {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.results-table-wrapper,
.results-cards-wrapper {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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