:root {
    --bg: #edf2f9;
    --card: #ffffff;
    --card-2: #f7f8fc;
    --text: #0f172a;
    --muted: #5b667a;
    --line: #d9deea;
    --primary: #0b5ed7;
    --primary-2: #0a3c8a;
    --ok: #059669;
    --warn: #d97706;
    --danger: #dc2626;
    --glass: rgba(255, 255, 255, .65);
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 16px 34px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.16);
    --ring: 0 0 0 4px rgba(11, 94, 215, 0.20);
    --premium-1: #00a6fb;
    --premium-2: #0b5ed7;
    --premium-3: #00d1ff;
    --premium-4: #0a2540;
    --premium-5: #113a6b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
            radial-gradient(1200px 580px at -10% -10%, rgba(0, 166, 251, .16) 0%, transparent 58%),
            radial-gradient(900px 520px at 110% -15%, rgba(11, 94, 215, .16) 0%, transparent 55%),
            radial-gradient(900px 620px at 50% 120%, rgba(0, 209, 255, .10) 0%, transparent 60%),
            linear-gradient(180deg, #f8fbff 0%, var(--bg) 45%, #e8f0fa 100%);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(circle at 50% 10%, black 20%, transparent 75%);
    z-index: -1;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(10px);
    background:
        radial-gradient(circle at 15% 0%, rgba(0, 166, 251, .26), transparent 45%),
        radial-gradient(circle at 85% 0%, rgba(0, 209, 255, .20), transparent 55%),
        linear-gradient(135deg, rgba(7, 20, 38, 0.98), rgba(11, 46, 91, 0.95));
    color: #cbd5e1;
    padding: 14px 20px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 30px rgba(2, 6, 23, .25);
}

.topbar::before {
    content: "";
    color: #e2e8f0;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-right: 6px;
    padding-right: 8px;
    border-right: 1px solid rgba(148, 163, 184, 0.3);
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0 !important;
    font-weight: 800 !important;
}

.topbar-brand.right {
    margin-left: auto;
}

.topbar-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,.35));
}

.topbar-center {
    font-weight: 900;
    letter-spacing: .08em;
    font-size: 12px;
    color: #d9ecff;
    text-transform: uppercase;
    margin-left: 8px;
}

.topbar a {
    color: #cbd5e1;
    padding: 7px 10px;
    border-radius: 8px;
    transition: .2s ease;
    font-weight: 600;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.topbar a:hover {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(191, 219, 254, .24);
    text-decoration: none;
}

.topbar a::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 3px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--premium-1), var(--premium-4), var(--premium-3));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.topbar a:hover::after { transform: scaleX(1); }

.topbar a[href*="logout"],
.topbar a[href*="cikis"] {
    background: rgba(248, 113, 113, .12);
    border-color: rgba(248, 113, 113, .18);
}

.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 26px;
}

.card {
    background:
        linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(248,251,255,.97) 100%),
        linear-gradient(135deg, rgba(0,166,251,.05), rgba(11,94,215,.05));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--premium-1), var(--premium-2), var(--premium-3), var(--premium-1));
    background-size: 220% 100%;
    opacity: 0.85;
    animation: premiumShift 8s linear infinite;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card::before {
    content: "";
    position: absolute;
    inset: -60% auto auto -30%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(11, 94, 215, 0.16) 0%, rgba(11, 94, 215, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.grid > .card {
    background: linear-gradient(165deg, #ffffff 0%, #f3f9ff 100%);
    border-color: #d6e5f7;
}

label {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
    color: #334155;
}

input, select, textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    outline: 0;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

select {
    appearance: none;
    background-image:
            linear-gradient(45deg, transparent 50%, #64748b 50%),
            linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position:
            calc(100% - 18px) calc(50% - 2px),
            calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

input:focus, select:focus, textarea:focus {
    border-color: #0b5ed7;
    box-shadow: var(--ring);
    transform: translateY(-1px);
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e6edf7, 0 8px 20px rgba(15, 23, 42, .05);
}

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

th {
    background: linear-gradient(135deg, #0a2540 0%, #0b3b70 55%, #0b5ed7 100%);
    color: #eef7ff;
    font-size: 13px;
    letter-spacing: 0.02em;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

tbody tr:nth-child(even) {
    background: linear-gradient(180deg, #fbfdff, #f8fbff);
}

tbody tr:hover {
    background: #f0f7ff;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 13px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
    letter-spacing: 0.01em;
}

.btn {
    background: linear-gradient(180deg, #ffffff, #edf4ff);
    border: 1px solid #d7e3f3;
    color: #1e293b;
    box-shadow: 0 8px 16px rgba(15, 23, 42, .07);
}

.btn-primary {
    background: linear-gradient(135deg, #00a6fb, #0b5ed7 62%, #0a3c8a);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(11, 94, 215, .35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1db3ff, #0b4fb4 70%, #0a316f);
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    box-shadow: 0 10px 20px rgba(239, 68, 68, .3);
}

.btn-ok {
    background: linear-gradient(135deg, #00c389, #008b62);
    color: #fff;
    box-shadow: 0 10px 20px rgba(16, 185, 129, .3);
}

.btn:hover {
    text-decoration: none;
    filter: brightness(1.02);
    transform: translateY(-1px);
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.alert-error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.alert-ok { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.alert-warn { background: #fef3c7; color: #92400e; border-color: #fde68a; }

.alert-error,
.alert-ok,
.alert-warn {
    box-shadow: 0 12px 24px -20px rgba(15, 23, 42, .5);
}

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

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #b7dbff;
    background: #eaf5ff;
    color: #0b4da2;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.card h1,
.card h2 {
    background: linear-gradient(90deg, #0a2540, #0b5ed7 55%, #0a3c8a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card h2::after,
.card h3::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #00a6fb, #0b5ed7, #00d1ff);
    opacity: .9;
}

h1 {
    font-size: clamp(24px, 2.4vw, 34px);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(20px, 2vw, 28px);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(17px, 1.6vw, 22px);
}

.viewer-hero {
    background:
        radial-gradient(circle at 15% 0%, rgba(56, 189, 248, .25), transparent 45%),
        linear-gradient(135deg, #0f172a, #1e293b);
    color: #e2e8f0;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.viewer-hero .muted {
    color: #cbd5e1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.stat-box {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat-box strong {
    display: block;
    font-size: 24px;
    line-height: 1;
}

.stat-box span {
    font-size: 12px;
    color: #bfdbfe;
}

.match-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

.match-list li {
    margin-bottom: 4px;
}

.eleme-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.eleme-col {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.eleme-match {
    border: 1px solid #dbeafe;
    background: linear-gradient(180deg, #eff6ff, #e8f1ff);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.09);
}

code, pre {
    font-family: Consolas, 'Courier New', monospace;
}

pre {
    border: 1px solid #1e293b;
}

/* Login kartını daha premium göster */
.card[style*="max-width:440px"] {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

/* Scrollbar estetiği */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #94a3b8, #64748b);
    border-radius: 20px;
}

*::-webkit-scrollbar-track {
    background: #e2e8f0;
}

h1, h2, h3, h4 {
    line-height: 1.25;
    margin-top: 0;
}

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

    .card {
        padding: 15px;
        border-radius: 12px;
    }

    .topbar::before {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
        padding-bottom: 6px;
        margin-bottom: 2px;
    }

    .topbar-center {
        width: 100%;
        order: 3;
        text-align: center;
        margin: 0;
    }

    .topbar-brand.right {
        margin-left: 0;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 6px;
    }

    table {
        font-size: 13px;
    }
}

@keyframes premiumShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

