﻿:root {
    --bg-top: #1d2a6d;
    --bg-bottom: #0b1026;
    --panel: rgba(17, 24, 39, 0.88);
    --panel-2: rgba(12, 18, 34, 0.92);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --line: rgba(255, 255, 255, 0.12);
    --blue: #3b82f6;
    --blue-2: #60a5fa;
    --red: #ef4444;
    --red-2: #f87171;
    --yellow: #facc15;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    min-height: 100%;
    overflow: hidden;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top, rgba(96, 165, 250, 0.16), transparent 28%), radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.14), transparent 24%), linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        opacity: 0.18;
        background: linear-gradient(90deg, transparent 0 48%, rgba(255,255,255,0.06) 48% 52%, transparent 52%), linear-gradient(0deg, transparent 0 48%, rgba(255,255,255,0.06) 48% 52%, transparent 52%);
        background-size: 160px 160px;
    }

.page-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

    .page-shell.top {
        align-items: flex-start;
        padding-top: 40px;
        padding-bottom: 40px;
    }

.panel-wrap {
    position: relative;
    width: min(100%, 760px);
}

    .panel-wrap.compact {
        width: min(100%, 460px);
    }

.panel-glow {
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius) + 2px);
    background: linear-gradient( 135deg, rgba(250, 204, 21, 0.9), rgba(59, 130, 246, 0.9), rgba(239, 68, 68, 0.9), rgba(250, 204, 21, 0.9) );
    background-size: 300% 300%;
    filter: blur(10px);
    opacity: 0.55;
    animation: borderShift 8s ease-in-out infinite alternate;
}

@keyframes borderShift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.panel {
    position: relative;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)), linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 96px);
}

    .panel::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(circle at top left, rgba(255,255,255,0.14), transparent 26%), radial-gradient(circle at bottom right, rgba(255,255,255,0.08), transparent 20%);
    }

.panel-header {
    position: relative;
    padding: 22px 24px 12px;
    border-bottom: 1px solid var(--line);
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-ball {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ff6b6b 0 48%, #f8fafc 48% 52%, #f8fafc 52% 100%);
    border: 4px solid #111827;
    position: relative;
    box-shadow: 0 8px 22px rgba(0,0,0,0.35);
    flex: 0 0 auto;
}

    .brand-ball::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 16px;
        height: 16px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: #f8fafc;
        border: 4px solid #111827;
    }

.page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.page-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.panel-body {
    position: relative;
    padding: 22px 24px 24px;
    overflow-y: auto;
    flex: 1;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

    .panel-body::-webkit-scrollbar {
        width: 10px;
    }

    .panel-body::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.15);
        border-radius: 10px;
    }

        .panel-body::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,0.25);
        }

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field > span,
    .check-label {
        font-size: 0.92rem;
        color: var(--muted);
        font-weight: 600;
    }

.input,
.number-input,
.password-input {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(6, 10, 25, 0.72);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

    .input:focus,
    .number-input:focus,
    .password-input:focus {
        outline: none;
        border-color: rgba(96, 165, 250, 0.75);
        box-shadow: 0 0 0 4px rgba(59,130,246,0.16), inset 0 1px 0 rgba(255,255,255,0.06);
    }

select.input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(6, 10, 25, 0.45);
    border: 1px solid rgba(255,255,255,0.08);
}

    .checkbox-row input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

    .button-row.even {
        justify-content: space-between;
    }

    .button-row.center {
        justify-content: center;
    }

    .button-row.even .btn {
        flex: 1;
        min-width: 140px;
        text-align: center;
    }

    .button-row.center form {
        display: flex;
    }

.btn {
    appearance: none;
    border: none;
    cursor: pointer;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    color: white;
    box-shadow: 0 10px 24px rgba(0,0,0,0.24);
    text-decoration: none;
}

    .btn:hover {
        transform: translateY(-1px);
    }

    .btn:active {
        transform: translateY(0);
    }

.btn-primary {
    background: linear-gradient(180deg, var(--blue-2), var(--blue));
}

.btn-secondary {
    background: linear-gradient(180deg, #4b5563, #374151);
}

.btn-ghost {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text);
}

.btn-pokemon {
    background: linear-gradient(180deg, #ff5a5a, #dc2626);
    color: white;
    border: 2px solid #111827;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25), 0 0 18px rgba(239, 68, 68, 0.35);
}

    .btn-pokemon:hover {
        background: linear-gradient(180deg, #ff6b6b, #ef4444);
        box-shadow: 0 12px 28px rgba(0,0,0,0.3), 0 0 22px rgba(239, 68, 68, 0.5);
    }

    .btn-pokemon:active {
        background: linear-gradient(180deg, #dc2626, #b91c1c);
    }

.pokeball-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 148px;
    background: linear-gradient(180deg, #ff6b6b 0 48%, #ffffff 48% 52%, #f8fafc 52% 100%);
    color: #111827;
    border: 3px solid #111827;
    box-shadow: 0 12px 26px rgba(0,0,0,0.32), 0 0 18px rgba(239, 68, 68, 0.30);
    overflow: hidden;
}

    .pokeball-btn::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
        transform: translateX(-120%);
        animation: shineMove 2.6s ease-in-out infinite;
        z-index: 0;
    }

    .pokeball-btn > span {
        position: relative;
        z-index: 1;
        padding-left: 0;
    }

@keyframes shineMove {
    0%, 15% {
        transform: translateX(-120%);
    }

    60% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(120%);
    }
}

.status-box {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--muted);
    font-size: 0.95rem;
}

.status-error {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.26);
    margin-top: 20px;
}

.info-card {
    margin-top: 8px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(6, 10, 25, 0.45);
    border: 1px solid rgba(255,255,255,0.08);
}

.info-title {
    margin: 0 0 8px;
    font-size: 0.92rem;
    color: var(--muted);
    font-weight: 700;
}

.info-link {
    color: #bfdbfe;
    word-break: break-all;
    text-decoration: none;
}

    .info-link:hover {
        text-decoration: underline;
    }

.divider {
    height: 1px;
    margin: 8px 0 2px;
    background: var(--line);
    border: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-actions {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.login-note {
    margin-top: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 8px;
}

.preview-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(6, 10, 25, 0.45);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
}

    .preview-card:hover {
        border-color: rgba(255, 203, 5, 0.35);
        box-shadow: 0 0 20px rgba(255, 203, 5, 0.12);
    }

.preview-title {
    margin: 0 0 10px;
    font-size: 0.92rem;
    color: var(--muted);
    font-weight: 700;
}

.preview-frame {
    flex: 1;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.preview-label {
    max-height: 120px;
}

.preview-empty {
    color: var(--muted);
    text-align: center;
}

.admin-home {
    display: grid;
    gap: 22px;
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.hero-copy {
    flex: 1 1 500px;
    max-width: 700px;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #bfdbfe;
    font-weight: 800;
}

.admin-home-title {
    margin: 0 0 10px;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.05;
}

.hero-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.admin-section {
    display: grid;
    gap: 14px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

    .section-head h3 {
        margin: 0;
        font-size: 1.35rem;
        font-weight: 800;
    }

.overlay-count {
    color: var(--muted);
    font-size: 0.95rem;
}

.overlay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.overlay-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(6, 10, 25, 0.45);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    display: grid;
    gap: 12px;
}

.overlay-card-button {
    appearance: none;
    width: 100%;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

    .overlay-card-button:hover {
        transform: translateY(-2px);
        border-color: rgba(255, 203, 5, 0.25);
        box-shadow: 0 0 20px rgba(255, 203, 5, 0.08);
        background: rgba(10, 16, 36, 0.58);
    }

    .overlay-card-button:focus-visible {
        outline: none;
        border-color: rgba(96, 165, 250, 0.65);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18), 0 10px 24px rgba(0,0,0,0.18);
    }

.overlay-card-head {
    display: grid;
    gap: 4px;
}

    .overlay-card-head h4 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--text);
    }

.overlay-type {
    margin: 0;
    color: #bfdbfe;
    font-size: 0.92rem;
    font-weight: 700;
}

.overlay-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 720px) {
    .page-shell {
        padding: 14px;
    }

        .page-shell.top {
            padding-top: 18px;
            padding-bottom: 18px;
        }

    .panel-header,
    .panel-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .button-row {
        flex-direction: column;
    }

    .btn,
    .pokeball-btn {
        width: 100%;
    }

    .brand-row {
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .admin-home-title {
        font-size: 1.6rem;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions {
        width: 100%;
        justify-content: stretch;
        margin-left: 0;
    }

        .hero-actions .btn {
            width: 100%;
        }

    .button-row.even {
        flex-direction: column;
    }

        .button-row.even .btn {
            width: 100%;
        }
}
