@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Nunito:wght@400;600;700;800;900&family=Montserrat:wght@700;800;900&display=swap');

:root {
    --bg: #020617;
    --sidebar: rgba(15, 23, 42, 0.7);
    --card: rgba(30, 41, 59, 0.4);
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.3);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at top right, #0f172a, #020617);
    color: var(--text);
    font-family: var(--font-body);
    margin: 0;
    display: flex;
    min-height: 100vh;
}

h1, h2, h3, h4, .section-title {
    font-family: var(--font-heading);
}

/* --- Sidebar --- */
.admin-sidebar {
    width: 300px;
    background: var(--sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem 1.5rem;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.admin-sidebar h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    margin-bottom: 3.5rem;
    padding-left: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9375rem;
}

.nav-item i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    opacity: 0.7;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.05));
    color: var(--accent);
    font-weight: 700;
    border-left: 3px solid var(--accent);
    box-shadow: 0 4px 15px -3px var(--accent-glow);
}

/* --- Main Content --- */
.admin-main {
    flex: 1;
    padding: 4rem 5rem 4rem 4rem;
    min-width: 0;
    background: radial-gradient(circle at center, transparent, rgba(0,0,0,0.4));
    overflow-y: auto;
}

.admin-header {
    margin-bottom: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
}

.admin-card {
    background: var(--card);
    backdrop-filter: blur(10px);
    padding: 3.5rem 4rem; /* Increased internal padding */
    border-radius: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 2.5rem;
    width: 100%;
    max-width: 1400px;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.5px;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

input, select, textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    color: white;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn {
    background: var(--accent);
    color: #000;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px -5px var(--accent-glow);
    background: #7dd3fc;
}

/* --- Layout Grid --- */
.responsive-grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.grid-2-1-1 { grid-template-columns: 2fr 1fr 1fr; }
.grid-1-1-2 { grid-template-columns: 1fr 1fr 2fr; }

/* --- Preview --- */
.live-link-box {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    padding: 2rem;
    border-radius: 1.5rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 20px 40px -10px rgba(14, 165, 233, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
}

.live-link-box code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.5rem;
    letter-spacing: 2px;
    background: rgba(0,0,0,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 0.75rem;
}

/* --- Badges --- */
.badge {
    padding: 0.4rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-admin { background: rgba(56, 189, 248, 0.1); color: var(--accent); border: 1px solid var(--accent); }
.badge-owner { background: rgba(255, 255, 255, 0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1); }

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 280px !important;
        position: relative !important;
        left: 0 !important;
    }
    
    .admin-main {
        margin-left: 0 !important;
        width: calc(100% - 280px) !important;
    }

    #mobile-menu-trigger, .sidebar-overlay {
        display: none !important;
    }

    /* Stack grids on mobile for better usability */
    .grid-4, .grid-3 {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 768px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr !important;
    }
    body {
        flex-direction: column !important;
    }
    .admin-sidebar {
        width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }
    .admin-main {
        width: 100% !important;
    }
}

/* --- Custom Odyssey Modal Dialog System --- */
.odyssey-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 110000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

.odyssey-modal-overlay.active {
    opacity: 1;
}

.odyssey-modal-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 2.25rem;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(56, 189, 248, 0.1);
    transform: scale(0.9);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    color: #f8fafc;
}

.odyssey-modal-overlay.active .odyssey-modal-card {
    transform: scale(1);
}

.odyssey-modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #f8fafc;
}

.odyssey-modal-message {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.odyssey-modal-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.odyssey-modal-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.odyssey-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.odyssey-modal-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.odyssey-modal-btn-primary {
    background: var(--accent);
    color: #020617;
}

.odyssey-modal-btn-primary:hover {
    background: #7dd3fc;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.odyssey-modal-btn-danger {
    background: #ef4444;
    color: #fff;
}

.odyssey-modal-btn-danger:hover {
    background: #f87171;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.odyssey-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.odyssey-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

