/* ==========================================================================
   INHACK Security Portal - High-Performance Developer Console Stylesheet
   Design Style: Inspired by Unity & Unreal Engine Official Portals
   Strict Directives: Default Dark Onyx, Technical HUD, Sharp Edges, High Contrast
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Fira+Code:wght@400;500;700&family=Outfit:wght@300;400;500;700&display=swap');

:root {
    /* Color Palette */
    --bg-base: #0b0f19;               /* Premium dark slate blue base */
    --bg-surface: #151b2d;            /* Structured slate surface */
    --bg-surface-header: #0e1320;     /* Header surface deep navy */
    --bg-sidebar: #0e1320;            /* Sidebar surface deep navy */
    
    /* Formal Accent Accents */
    --color-cyan: #3b82f6;            /* Sapphire blue primary */
    --color-cyan-glow: rgba(59, 130, 246, 0.15);
    --color-blue: #2563eb;            /* Royal/indigo blue hover */
    --color-blue-glow: rgba(37, 99, 235, 0.15);
    --color-green: #10b981;           /* Forest green secure */
    --color-red: #ef4444;             /* Muted crimson error */
    
    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Borders & Outlines */
    --border-dim: 1px solid rgba(255, 255, 255, 0.08);
    --border-tech: 1px solid rgba(59, 130, 246, 0.2);
    --border-tech-active: 1px solid #3b82f6;
    
    /* Transits */
    --transition-fast: 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-mid: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   Global Reset & Structure
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-anchor: none;
}

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

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

/* ==========================================================================
   Top Telemetry Status Bar
   ========================================================================== */
.system-status-bar {
    background-color: #000000;
    border-bottom: var(--border-dim);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #475569;
    padding: 6px 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 1.5px;
    user-select: none;
    z-index: 101;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-green);
    font-weight: 700;
}

.status-ping-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-green);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.system-title-tag {
    color: #64748b;
}

.system-time {
    color: #64748b;
    font-weight: 500;
}

/* ==========================================================================
   Header Styling
   ========================================================================== */
header {
    background-color: rgba(10, 13, 22, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--border-dim);
    padding: 1.25rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

header img {
    height: 38px;
    width: auto;
    transition: opacity var(--transition-fast);
}

header img:hover {
    opacity: 0.9;
}

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

.logo-main {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.45rem;
    line-height: 1.1;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #ffffff 0%, var(--color-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #475569;
    letter-spacing: 2px;
    margin-top: 2px;
}

/* Navigation buttons generated dynamically */
nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

nav button {
    background-color: transparent;
    color: #ffffff;
    border: var(--border-dim);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.65rem 1.4rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    border-radius: 4px;
}

nav button:hover {
    border-color: var(--color-cyan);
    background-color: rgba(59, 130, 246, 0.08);
}

nav button#login-btn {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
}

nav button#logout-btn {
    border-color: var(--color-red);
    color: var(--color-red);
}

nav button#logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.08);
}

nav button#renew-btn {
    border-color: var(--color-green);
    color: var(--color-green);
}

nav button#renew-btn:hover {
    background-color: rgba(16, 185, 129, 0.08);
}

nav button#logout-shared-btn {
    border-color: var(--color-red);
    color: var(--color-red);
}

nav button#logout-shared-btn:hover {
    background-color: rgba(239, 68, 68, 0.08);
}

nav button#mypage-btn {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.75);
    border: var(--border-dim);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.65rem 1.4rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 4px;
}

nav button#mypage-btn:hover {
    color: #ffffff;
    border-color: var(--color-cyan);
    background-color: rgba(59, 130, 246, 0.08);
}

/* ==========================================================================
   Main Grid Layout
   ========================================================================== */
main {
    flex: 1;
    display: flex;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    gap: 2.25rem;
    align-items: flex-start;
}

/* ==========================================================================
   Sidebar Styling
   ========================================================================== */
aside {
    width: 260px;
    background-color: var(--bg-sidebar);
    border: var(--border-dim);
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}

.sidebar-header {
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: var(--border-dim);
    padding: 0.9rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1px;
}

.sidebar-term-symbol {
    color: var(--color-cyan);
}

aside ul {
    list-style: none;
}

aside ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    position: relative;
}

/* Submenu (nested nav items) */
aside ul li ul.submenu {
    list-style: none;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

aside ul li.has-submenu > a::after {
    display: none;
}

aside ul li .submenu-toggle {
    position: absolute;
    right: 0;
    top: 0;
    width: 80px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1.25rem;
    cursor: pointer;
    z-index: 5;
    color: #475569;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

aside ul li .submenu-toggle span {
    display: inline-block;
    transition: transform 0.2s ease;
    transform-origin: center;
}

aside ul li.has-submenu.open > .submenu-toggle {
    color: var(--color-cyan);
}

aside ul li.has-submenu.open > .submenu-toggle span {
    transform: rotate(90deg);
}

aside ul li.has-submenu.open > ul.submenu {
    max-height: 400px;
}

aside ul li.has-submenu > a {
    padding-left: 1.1rem;
    padding-right: 80px;
}

aside ul li.has-submenu > a:hover, aside ul li.has-submenu > a.active {
    padding-left: calc(1.1rem - 3px);
    padding-right: 80px;
}

aside ul li ul.submenu li a {
    padding: 0.65rem 1.5rem 0.65rem 3.25rem;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 500;
    border-left: none;
}

aside ul li ul.submenu li a:hover {
    color: #e2e8f0;
    background-color: rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(0, 240, 255, 0.4);
    padding-left: calc(3.25rem - 2px);
}

aside ul li a {
    display: flex;
    align-items: center;
    padding: 1.05rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 1.5px;
    color: #94a3b8;
    transition: all var(--transition-fast);
}

.nav-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #475569;
    margin-right: 12px;
    font-weight: 400;
}

aside ul li a:hover, aside ul li a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--color-cyan);
    padding-left: calc(1.25rem - 3px);
}

/* Sidebar Footer Info box */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: var(--border-dim);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: #334155;
    letter-spacing: 1px;
}

/* ==========================================================================
   Main View Panel
   ========================================================================== */
section#view {
    flex: 1;
    background-color: var(--bg-surface);
    border: var(--border-dim);
    padding: 3rem;
    min-height: 550px;
    position: relative;
    border-radius: 4px;
}

/* HUD Panel Title / Header Structure */
.section-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-cyan);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

section h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1.2;
}

.section-desc {
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 6px;
    line-height: 1.6;
}

/* ==========================================================================
   Fade-in Page Animations
   ========================================================================== */
.animate-fade-in {
    animation: renderContent 0.3s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes renderContent {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   [1] Home View Styling
   ========================================================================== */
.terminal-banner {
    border-left: 2px solid var(--color-cyan);
    padding-left: 1.75rem;
    margin-bottom: 3rem;
}

.banner-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #475569;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 4px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.lead-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.hero-desc {
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.75;
}

/* Telemetry Grid Component */
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.tel-box {
    background-color: rgba(255, 255, 255, 0.015);
    border: var(--border-dim);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    border-radius: 2px;
}

.tel-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #475569;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.tel-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 6px;
}

.tel-desc {
    font-size: 0.8rem;
    color: #64748b;
}

/* Generic Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.feat-card {
    background-color: rgba(0, 0, 0, 0.25);
    border: var(--border-dim);
    padding: 2rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.feat-card:hover {
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.05);
}

.feat-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.feat-card-id {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-cyan);
}

.feat-card h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.feat-card p {
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ==========================================================================
   [2] Curriculum View Styling
   ========================================================================== */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.roadmap-card {
    background-color: rgba(255, 255, 255, 0.01);
    border: var(--border-dim);
    padding: 2.25rem 2rem;
    position: relative;
    transition: all var(--transition-mid);
}

.roadmap-card:hover {
    border-color: var(--color-cyan);
    background-color: rgba(59, 130, 246, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.card-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-cyan);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.card-title, .roadmap-card h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.card-desc, .roadmap-card p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.card-topics, .roadmap-card ul {
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
}

.card-topics li, .roadmap-card ul li {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.roadmap-card:hover .card-topics li, .roadmap-card:hover ul li {
    color: #cbd5e1;
}

.roadmap-card ul li::before {
    content: '';
    width: 4px;
    height: 4px;
    background-color: var(--color-cyan);
    display: inline-block;
    flex-shrink: 0;
    margin-right: 10px;
}

.topic-dot {
    width: 4px;
    height: 4px;
    background-color: var(--color-cyan);
    display: inline-block;
    flex-shrink: 0;
}

/* ==========================================================================
   [3] Seminar Timeline Styling
   ========================================================================== */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-left: 1.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.06);
}

.timeline-item {
    position: relative;
    margin-bottom: 3.5rem;
}

.timeline-item:last-child {
    margin-bottom: 1rem;
}

/* Floating custom bullet */
.timeline-item::before {
    content: "";
    position: absolute;
    left: calc(-2rem - 4.5px);
    top: 22px;
    width: 8px;
    height: 8px;
    background-color: var(--bg-base);
    border: 1px solid var(--color-cyan);
    z-index: 2;
    transition: all var(--transition-mid);
}

.timeline-item:hover::before {
    background-color: var(--color-cyan);
    transform: scale(1.3);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-cyan);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.timeline-content {
    background-color: rgba(255, 255, 255, 0.01);
    border: var(--border-dim);
    padding: 1.75rem 2rem;
    transition: all var(--transition-fast);
}

.timeline-content:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.015);
}

.timeline-title, .timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.timeline-content p {
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.presenter {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #475569;
    letter-spacing: 0.5px;
    display: block;
}

/* ==========================================================================
   [4] CTF Scoreboard & Challenges Dashboard Styling
   ========================================================================== */
.ctf-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: flex-start;
}

.panel-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #64748b;
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
}

.ctf-table, .scoreboard-section table {
    width: 100%;
    border-collapse: collapse;
}

.ctf-table th, .scoreboard-section table th {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #475569;
    letter-spacing: 1px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    font-weight: 700;
}

.ctf-table td, .scoreboard-section table td {
    padding: 1.15rem 1.25rem;
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ctf-table tr, .scoreboard-section table tr {
    transition: background-color var(--transition-fast);
}

.ctf-table tbody tr:hover, .scoreboard-section table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

.ctf-table td.user-cell, .scoreboard-section table td:nth-child(2) {
    font-family: var(--font-heading);
    font-weight: 600;
    color: #ffffff;
}

.ctf-table td.pts-cell, .scoreboard-section table td:nth-child(3) {
    font-family: var(--font-mono);
    color: var(--color-cyan);
    font-weight: 700;
}

.ctf-table td.status-cell, .scoreboard-section table td:nth-child(4) {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #64748b;
}

/* Ranks Styles */
.rank-1 td, .scoreboard-section table tbody tr:nth-child(1) td {
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
    background-color: rgba(255, 215, 0, 0.01);
}
.rank-1 td.user-cell, .scoreboard-section table tbody tr:nth-child(1) td:nth-child(2) {
    color: #ffd700;
}
.rank-2 td.user-cell, .scoreboard-section table tbody tr:nth-child(2) td:nth-child(2) {
    color: #e2e8f0;
}
.rank-3 td.user-cell, .scoreboard-section table tbody tr:nth-child(3) td:nth-child(2) {
    color: #b45309;
}

/* Challenge elements */
.challenge-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.challenge-card {
    background-color: rgba(0, 0, 0, 0.2);
    border: var(--border-dim);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color var(--transition-fast);
}

.challenge-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.challenge-card.solved {
    border-left: 2px solid var(--color-green);
    background-color: rgba(0, 255, 102, 0.01);
}

.chal-category {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    letter-spacing: 1px;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.chal-category.web {
    background-color: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.25);
    color: var(--color-cyan);
}
.chal-category.pwn {
    background-color: rgba(0, 102, 255, 0.06);
    border-color: rgba(0, 102, 255, 0.25);
    color: var(--color-blue);
}
.chal-category.rev {
    background-color: rgba(255, 0, 60, 0.06);
    border-color: rgba(255, 0, 60, 0.25);
    color: var(--color-red);
}
.chal-category.crypto {
    background-color: rgba(234, 179, 8, 0.06);
    border-color: rgba(234, 179, 8, 0.25);
    color: #ffd700;
}
.chal-category.forensics {
    background-color: rgba(168, 85, 247, 0.06);
    border-color: rgba(168, 85, 247, 0.25);
    color: #c084fc;
}
.chal-category.misc {
    background-color: rgba(236, 72, 153, 0.06);
    border-color: rgba(236, 72, 153, 0.25);
    color: #f472b6;
}


.chal-details {
    flex: 1;
    margin-left: 1.25rem;
    margin-right: 1.25rem;
}

.chal-details h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

.chal-pts {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 0;
}

.challenge-card.solved .chal-pts {
    color: var(--color-green);
}

.status-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 8px;
}

.status-badge.solved {
    color: var(--color-green);
}

.status-badge.open {
    color: var(--color-cyan);
}

/* ==========================================================================
   Footer Component
   ========================================================================== */
footer {
    background-color: #000000;
    border-top: var(--border-dim);
    padding: 2rem 3rem;
    text-align: center;
    color: #475569;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1100px) {
    main {
        flex-direction: column;
        align-items: stretch;
    }
    
    aside {
        width: 100%;
        position: static;
        margin-bottom: 1.5rem;
    }
    
    aside ul {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }
    
    aside ul li {
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.02);
    }
    
    aside ul li a {
        justify-content: center;
        padding: 1.25rem 0.5rem;
    }

    /* Submenu overlay behavior for grid navigation */
    aside ul li ul.submenu {
        display: block; /* Override display: grid from aside ul */
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 180px;
        width: max-content;
        z-index: 50;
        background: #0e1320;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
    }

    aside ul li ul.submenu li {
        display: block; /* Override grid item layout */
        width: 100%;
        border-right: none; /* Override border-right from top-level li */
        border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    }

    aside ul li ul.submenu li a {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 0.65rem 1.25rem;
        font-size: 0.78rem;
        width: 100%;
        border-left: none !important;
    }

    /* Hover dropdown for horizontal bar layout (between 501px and 1100px) */
    @media (min-width: 501px) {
        aside ul li:hover ul.submenu {
            max-height: 250px;
        }
        aside ul li:hover > .submenu-toggle {
            color: var(--color-cyan);
        }
        aside ul li:hover > .submenu-toggle span {
            transform: rotate(90deg);
        }
    }
    
    .ctf-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 0.85rem;
        padding: 1rem 1.5rem;
    }

    .header-left {
        width: 100%;
        justify-content: center;
    }

    .logo-sub {
        display: none; /* Hide subtext to save horizontal space on mobile */
    }

    nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    nav button {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
    
    main {
        padding: 1.5rem 1.5rem;
    }
    
    .system-status-bar {
        padding: 6px 1.5rem;
    }
    
    aside ul {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .telemetry-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .roadmap-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    section#view {
        padding: 1.75rem;
    }
    
    section h2 {
        font-size: 1.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 500px) {
    aside ul {
        grid-template-columns: 1fr;
    }

    /* Reset submenu to vertical flow accordion on mobile portrait list layout */
    aside ul li ul.submenu {
        display: block;
        position: static;
        border: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        width: 100%;
    }

    aside ul li ul.submenu li {
        display: block;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    }

    aside ul li ul.submenu li a {
        display: flex;
        justify-content: flex-start;
        padding: 0.65rem 1.5rem 0.65rem 3.25rem; /* Indented on mobile accordion */
    }
}

/* ==========================================================================
   [11] Admin Control Panel Cybernetic Styling
   ========================================================================== */
.page-admin {
    color: #e2e8f0;
}

/* Tabs Navigation & Buttons styling */
.page-admin .admin-tabs-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}

.page-admin .admin-tab-btn {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    padding: 10px 20px;
    font-family: var(--font-mono), monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    background: rgba(255, 255, 255, 0.02);
}

.page-admin .admin-tab-btn[data-tab="users"]:hover,
.page-admin .admin-tab-btn[data-tab="users"].active {
    border-color: #ff4b4b;
    color: #ff4b4b;
    background: rgba(255, 75, 75, 0.08);
    box-shadow: 0 0 12px rgba(255, 75, 75, 0.2);
}

.page-admin .admin-tab-btn[data-tab="content"]:hover,
.page-admin .admin-tab-btn[data-tab="content"].active {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.page-admin .admin-tab-pane {
    display: none;
}

.page-admin .admin-tab-pane.active {
    display: block;
}


/* Reset and apply cybernetic style to ALL buttons on the admin page */
.page-admin button, 
.page-admin .action-btn, 
.page-admin .tool-btn {
    all: unset; /* reset browser default button styles */
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-family: 'Space Grotesk', var(--font-body), sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

/* Standard cybernetic cyan button outline */
.page-admin button.action-btn,
.page-admin button[type="submit"] {
    background: rgba(0, 240, 255, 0.03);
    border: 1px solid var(--color-cyan);
    color: var(--color-cyan);
    width: 100%;
}

.page-admin button.action-btn:hover,
.page-admin button[type="submit"]:hover {
    background: var(--color-cyan) !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.page-admin button.action-btn:active,
.page-admin button[type="submit"]:active {
    transform: scale(0.98);
}

/* File Upload Button Specifics */
.page-admin #admin-upload-trigger-btn {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid #10b981;
    color: #10b981;
    font-size: 0.75rem;
    padding: 8px 14px;
    width: auto;
}
.page-admin #admin-upload-trigger-btn:hover {
    background: #10b981 !important;
    color: #000000 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

/* Block creation toolbar container */
.page-admin .block-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 1.5rem;
    background: rgba(10, 15, 26, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    align-items: center;
}

/* Tool Buttons inside toolbar */
.page-admin .block-toolbar .tool-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 6px 12px;
    font-size: 0.72rem;
    font-family: var(--font-mono), monospace;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.5px;
}
.page-admin .block-toolbar .tool-btn:hover {
    background: rgba(0, 240, 255, 0.06) !important;
    border-color: #00f0ff !important;
    color: #00f0ff !important;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
    transform: translateY(-1px);
}
.page-admin .block-toolbar .tool-btn:active {
    transform: translateY(0);
}

/* All inputs, textareas, and select elements on admin page */
.page-admin input[type="text"],
.page-admin input[type="password"],
.page-admin select,
.page-admin textarea,
.page-admin .block-form-input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    background: rgba(10, 15, 26, 0.65);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 4px;
    color: #ffffff;
    font-family: var(--font-body), sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.page-admin input[type="text"]::placeholder,
.page-admin input[type="password"]::placeholder,
.page-admin textarea::placeholder,
.page-admin .block-form-input::placeholder {
    color: rgba(148, 163, 184, 0.35); /* clearly visible but placeholder-like */
}

.page-admin input[type="text"]:focus,
.page-admin input[type="password"]:focus,
.page-admin select:focus,
.page-admin textarea:focus,
.page-admin .block-form-input:focus {
    border-color: #00f0ff;
    background: rgba(10, 15, 26, 0.85);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

/* Select element styling */
.page-admin select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%233b82f6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.page-admin select option {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

/* Contenteditable Rich Text Editor styling */
.page-admin .content-editor {
    white-space: pre-wrap;
    word-break: break-all;
    overflow-y: auto;
    min-height: 60px;
}
.page-admin .content-editor img {
    max-width: 100%;
    min-width: 80px;
    min-height: 80px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    margin: 10px 0;
    display: block;
    cursor: pointer;
}
.page-admin .content-editor img.img-broken {
    width: 280px !important;
    height: 140px !important;
    border: 2px dashed #f87171 !important;
    background: #1e293b !important;
    position: relative !important;
    display: block !important;
}
.page-admin .content-editor img.img-broken::before {
    content: "⚠️ 이미지를 불러올 수 없습니다";
    white-space: pre-wrap;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1e293b;
    color: #f87171;
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: center;
    font-weight: 500;
    border-radius: 4px;
    padding: 12px;
    box-sizing: border-box;
}

/* Custom textarea style, scrollbars and grab handle resize style */
.page-admin textarea {
    resize: vertical; /* only vertical resize allowed */
    min-height: 100px;
    word-break: break-word;      /* wrap long English words */
    overflow-wrap: break-word;   /* fallback for older browsers */
    white-space: pre-wrap;       /* respect newlines + wrap */
}

.page-admin textarea::-webkit-scrollbar {
    width: 6px;
}
.page-admin textarea::-webkit-scrollbar-track {
    background: transparent;
}
.page-admin textarea::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.2);
    border-radius: 3px;
}
.page-admin textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.4);
}

.page-admin textarea::-webkit-resizer {
    background-image: linear-gradient(135deg, transparent 60%, rgba(0, 240, 255, 0.6) 60%);
    width: 12px;
    height: 12px;
}

/* Left Sidebar Block Cards */
.page-admin .block-hierarchy-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
.page-admin .block-hierarchy-card:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.page-admin .block-hierarchy-card.active {
    background: rgba(0, 240, 255, 0.05) !important;
    border-color: #00f0ff !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

/* Color-coded left border based on block type */
.page-admin .block-hierarchy-card.block-type-banner { border-left: 3px solid #00f0ff; }
.page-admin .block-hierarchy-card.block-type-header { border-left: 3px solid #a855f7; }
.page-admin .block-hierarchy-card.block-type-features { border-left: 3px solid #3b82f6; }
.page-admin .block-hierarchy-card.block-type-spacer { border-left: 3px solid #64748b; }
.page-admin .block-hierarchy-card.block-type-phases { border-left: 3px solid #f59e0b; }
.page-admin .block-hierarchy-card.block-type-timeline { border-left: 3px solid #10b981; }
.page-admin .block-hierarchy-card.block-type-ctf_dashboard { border-left: 3px solid #eab308; }

/* Custom badges for block type tag */
.page-admin .block-badge {
    font-size: 0.6rem;
    font-weight: 800;
    font-family: var(--font-mono), monospace;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.page-admin .block-badge-banner { background: rgba(0, 240, 255, 0.1); color: #00f0ff; border: 1px solid rgba(0, 240, 255, 0.2); }
.page-admin .block-badge-header { background: rgba(168, 85, 247, 0.1); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.2); }
.page-admin .block-badge-features { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.page-admin .block-badge-spacer { background: rgba(100, 116, 139, 0.1); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.2); }
.page-admin .block-badge-phases { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.page-admin .block-badge-timeline { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.page-admin .block-badge-ctf_dashboard { background: rgba(234, 179, 8, 0.1); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.2); }
.page-admin .block-badge-menu_item { background: rgba(251, 191, 36, 0.08); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.25); }

/* Hierarchy small utility buttons (up/down arrows) */
.page-admin .block-hierarchy-card .hierarchy-btn {
    padding: 4px 6px;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-radius: 3px;
    width: auto;
    letter-spacing: 0;
    text-transform: none;
}
.page-admin .block-hierarchy-card .hierarchy-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
}

/* Left panel delete button */
.page-admin .block-hierarchy-card .hierarchy-btn.delete-block {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.page-admin .block-hierarchy-card .hierarchy-btn.delete-block:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}

/* Block Card Items - Visual card lists inside form */
.page-admin .block-card-item {
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-left: 3px solid rgba(0, 240, 255, 0.5); /* distinct glowing cybernetic bar */
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}
.page-admin .block-card-item:hover {
    border-color: rgba(0, 240, 255, 0.35);
    background: rgba(15, 23, 42, 0.5);
    border-left-color: #00f0ff;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.05);
}

/* Sub-card Header */
.page-admin .block-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}
.page-admin .block-card-title-label {
    font-size: 0.72rem;
    color: #00f0ff;
    font-family: var(--font-mono), monospace;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Sub-card Delete button overrides */
.page-admin .block-card-item .delete-card-item, 
.page-admin .block-card-item .delete-leaderboard-item, 
.page-admin .block-card-item .delete-challenge-item {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 4px 10px;
    font-size: 0.7rem;
    width: auto;
    text-transform: none;
    letter-spacing: 0;
}
.page-admin .block-card-item .delete-card-item:hover, 
.page-admin .block-card-item .delete-leaderboard-item:hover, 
.page-admin .block-card-item .delete-challenge-item:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}

/* Sub-card Add button overrides */
.page-admin .add-card-item, 
.page-admin .add-leaderboard-item, 
.page-admin .add-challenge-item {
    background: rgba(16, 185, 129, 0.03) !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    color: #10b981 !important;
    width: 100%;
    padding: 10px !important;
    font-size: 0.75rem !important;
}
.page-admin .add-card-item:hover, 
.page-admin .add-leaderboard-item:hover, 
.page-admin .add-challenge-item:hover {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: #10b981 !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* User Registration List delete button */
.page-admin .delete-user-btn {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 4px 8px;
    font-size: 0.7rem;
    width: auto;
    text-transform: none;
    letter-spacing: 0;
}
.page-admin .delete-user-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}

/* Drag and Drop visual feedback for block editor cards */
.page-admin .block-hierarchy-card.dragging {
    opacity: 0.45;
    border-style: dashed !important;
    border-color: #00f0ff !important;
    background: rgba(10, 15, 26, 0.5) !important;
}

.page-admin .block-hierarchy-card.drag-over {
    border-color: #00f0ff !important;
    background: rgba(0, 240, 255, 0.12) !important;
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

/* Fullscreen overlay editor wrapper */
.page-admin .admin-fullscreen-overlay {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 10, 0.98);
    backdrop-filter: blur(16px);
    z-index: 2000;
    flex-direction: column;
    box-sizing: border-box;
    animation: adminFadeIn 0.25s ease-out;
}

.page-admin .admin-fullscreen-overlay.active {
    display: flex;
}

@keyframes adminFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Header */
.page-admin .overlay-header {
    height: 75px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(10, 15, 26, 0.85);
    box-sizing: border-box;
}

.page-admin .overlay-title-sec {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-admin .overlay-title-sec .title-text {
    font-family: var(--font-heading), sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-cyan);
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

/* Pulsing dot indicator for cybernetic theme */
.page-admin .pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-cyan);
    animation: adminPulse 1.5s infinite;
}

@keyframes adminPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 15px var(--color-cyan); }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.page-admin .overlay-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.page-admin .control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-admin .control-group label {
    font-family: var(--font-mono), monospace;
    font-size: 0.65rem;
    color: #475569;
    font-weight: 700;
    letter-spacing: 1px;
}

.page-admin .control-group select {
    width: 180px;
    padding: 8px 12px;
    font-size: 0.75rem;
}

.page-admin .filename-text {
    font-family: var(--font-mono), monospace;
    font-size: 0.7rem;
    color: #64748b;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-admin .overlay-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Overriding overlay button sizes to make them sleek */
.page-admin .overlay-header button.action-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 0.75rem;
}

.page-admin .overlay-header button.save-btn {
    border-color: #00f0ff;
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.05);
}
.page-admin .overlay-header button.save-btn:hover {
    background: #00f0ff !important;
    color: #000 !important;
}

.page-admin .overlay-header button.close-btn {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}
.page-admin .overlay-header button.close-btn:hover {
    background: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.page-admin .overlay-header button.upload-btn {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
    padding: 6px 12px;
    font-size: 0.72rem;
}

/* Workspace Grid (Independent column scrolling!) */
.page-admin .overlay-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 260px 6px 1.2fr 6px 1fr;
    box-sizing: border-box;
    overflow: hidden; /* layout itself doesn't scroll */
}

@media (max-width: 1024px) {
    .page-admin .overlay-workspace {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    .page-admin .workspace-pane {
        height: auto !important;
        max-height: none !important;
    }
}

.page-admin .workspace-pane {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 75px);
    box-sizing: border-box;
}

.page-admin .block-list-pane {
    border-right: none;
}

.page-admin .form-editor-pane {
    border-right: none;
}

.page-admin .workspace-pane .pane-header {
    height: 40px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    font-family: var(--font-mono), monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1px;
    box-sizing: border-box;
}

.page-admin .workspace-pane .pane-content {
    flex: 1;
    overflow-y: auto; /* Independent Pane Scrolling */
    padding: 1.5rem;
    box-sizing: border-box;
}

.page-admin .block-list-pane .pane-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(5, 7, 12, 0.4);
}

.page-admin .form-editor-pane .pane-content {
    background: rgba(8, 11, 18, 0.6);
}

.page-admin .preview-pane .pane-content {
    background: rgba(15, 23, 42, 0.3);
}

/* Custom styled scrollbars inside overlay editor for sleek UI */
.page-admin .pane-content::-webkit-scrollbar {
    width: 6px;
}
.page-admin .pane-content::-webkit-scrollbar-track {
    background: transparent;
}
.page-admin .pane-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.2);
    border-radius: 3px;
}
.page-admin .pane-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.4);
}

/* Cybernetic Resizer Bars between panes */
.page-admin .workspace-resizer {
    width: 6px;
    background: rgba(0, 240, 255, 0.08);
    border-left: 1px solid rgba(0, 240, 255, 0.2);
    border-right: 1px solid rgba(0, 240, 255, 0.2);
    cursor: col-resize;
    position: relative;
    z-index: 100;
    transition: all 0.2s ease;
    user-select: none;
    height: 100%;
}

.page-admin .workspace-resizer:hover,
.page-admin .workspace-resizer.active {
    background: var(--color-cyan) !important;
    border-left-color: var(--color-cyan);
    border-right-color: var(--color-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.page-admin .workspace-resizer::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 24px;
    background: rgba(0, 240, 255, 0.4);
    border-radius: 1px;
    transition: background 0.2s;
}

.page-admin .workspace-resizer:hover::after,
.page-admin .workspace-resizer.active::after {
    background: #000;
}

/* Dragging state body cursor overrides */
body.resizing-active {
    cursor: col-resize !important;
    user-select: none !important;
}

/* ==========================================================================
   Admin Control Panel Scoped Styles
   ========================================================================== */
.page-admin .admin-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

.page-admin .admin-banner {
    margin-bottom: 2rem;
}

.page-admin .admin-banner .hero-title {
    color: #ff4b4b;
}

.page-admin .admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    grid-auto-rows: min-content;
}

.page-admin .admin-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Log Card variations */
.page-admin .log-card {
    padding: 1.5rem 1.25rem;
    background-color: var(--bg-surface);
    display: flex;
    flex-direction: column;
    border-radius: 4px;
}

.page-admin .log-card.card-red {
    border: 1px solid rgba(255, 75, 75, 0.15);
}

.page-admin .log-card.card-blue {
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.page-admin .log-card.card-purple {
    border: 1px solid rgba(168, 85, 247, 0.15);
}

.page-admin .log-card-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.page-admin .log-card.card-red .log-card-title {
    color: #ff4b4b;
    margin-bottom: 1.5rem;
}

.page-admin .log-card.card-blue .log-card-title {
    color: #3b82f6;
    margin-bottom: 1rem;
}

.page-admin .log-card.card-purple .log-card-title {
    color: #a855f7;
    margin-bottom: 1.5rem;
}

/* CSV Uploading Form elements */
.page-admin .log-card p {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 1.2rem;
}

.page-admin .download-wrapper {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-admin .download-btn {
    text-decoration: none;
    text-align: center;
    font-size: 0.72rem;
    padding: 6px 12px;
    border-color: rgba(59, 130, 246, 0.5);
    color: #3b82f6;
    width: auto;
    font-weight: 600;
}

.page-admin input[type="file"] {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #e2e8f0;
}

.page-admin .csv-result {
    margin-top: 1rem;
    font-size: 0.75rem;
    display: none;
    padding: 10px;
    border-radius: 4px;
    line-height: 1.4;
}

/* User management table/list elements */
.page-admin .user-list-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page-admin .user-list-header {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 8px 8px 8px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.page-admin .user-list-header .header-col-username {
    flex: 2;
}

.page-admin .user-list-header .header-col-name {
    flex: 0.8;
}

.page-admin .user-list-header .header-col-solved {
    width: 60px;
    text-align: center;
}

.page-admin .user-list-header .header-col-fixed {
    width: 70px;
    text-align: center;
}

.page-admin .user-list-container {
    max-height: 520px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.page-admin .user-list-message {
    text-align: center;
    color: #64748b;
    padding: 20px;
    font-size: 0.8rem;
}

/* User list dynamic row styling */
.page-admin .user-row {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    font-size: 0.8rem;
    color: #e2e8f0;
    margin: 0;
    border-radius: 0;
    transition: background-color 0.15s;
}

.page-admin .user-row:last-child {
    border-bottom: none;
}

.page-admin .user-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.page-admin .user-row.super-admin-row {
    background: rgba(239, 68, 68, 0.02);
    border-bottom: 1px solid rgba(239, 68, 68, 0.25);
}

.page-admin .user-row.super-admin-row:hover {
    background: rgba(239, 68, 68, 0.05);
}

.page-admin .user-row.admin-row {
    background: rgba(59, 130, 246, 0.02);
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
}

.page-admin .user-row.admin-row:hover {
    background: rgba(59, 130, 246, 0.05);
}

.page-admin .user-row.blocked {
    color: #64748b;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.page-admin .user-col-username {
    flex: 2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.page-admin .user-row.blocked .user-col-username {
    text-decoration: line-through;
}

.page-admin .user-col-name {
    flex: 0.8;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.page-admin .user-col-solved {
    width: 60px;
    text-align: center;
    color: #3b82f6;
}

.page-admin .user-col-activities,
.page-admin .header-col-activities {
    flex: 1;
    min-width: 0;
    padding-right: 8px;
}

.page-admin .user-col-solved a.view-solves-link {
    color: #3b82f6;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.15s ease;
}

.page-admin .user-col-solved a.view-solves-link:hover {
    color: #60a5fa;
}

.page-admin .blocked-badge {
    font-size: 0.65rem;
    color: #f59e0b;
    padding: 1px 4px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 3px;
    margin-left: 4px;
}

.page-admin .user-actions {
    width: 70px;
    display: flex;
    gap: 4px;
    justify-content: center;
    position: relative;
}

/* User Actions Dropdown Menu styling */
.user-actions-dropdown {
    position: fixed;
    z-index: 9999;
    background: #151b2d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    min-width: 130px;
    display: none;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.user-actions-dropdown.show {
    display: flex;
}

.user-actions-dropdown-item {
    padding: 10px 14px;
    font-size: 0.75rem;
    color: #e2e8f0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    cursor: pointer;
    width: 100%;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-actions-dropdown-item:last-child {
    border-bottom: none;
}

/* Option Specific Colors & Hover States */
.user-actions-dropdown-item.toggle-admin-option {
    color: #60a5fa;
}

.user-actions-dropdown-item.toggle-admin-option:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
}

.user-actions-dropdown-item.toggle-block-option {
    color: #fbbf24;
}

.user-actions-dropdown-item.toggle-block-option:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #fde047;
}

.user-actions-dropdown-item.danger {
    color: #f87171;
}

.user-actions-dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

/* Content Launch Screen styling */
.page-admin .content-launch-card {
    padding: 2.5rem;
    background-color: var(--bg-surface);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    border-radius: 4px;
}

.page-admin .content-launch-icon {
    font-size: 2.5rem;
}

.page-admin .content-launch-title {
    color: var(--color-cyan);
    font-size: 1.2rem;
    margin: 0;
    font-weight: 700;
}

.page-admin .content-launch-desc {
    color: #94a3b8;
    font-size: 0.85rem;
    max-width: 500px;
    margin: 0;
}

.page-admin .launch-btn {
    padding: 14px 28px;
    font-size: 0.9rem;
    border-color: #00f0ff;
    color: #00f0ff;
    font-weight: 700;
    width: auto;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

/* Admin form styling & spacing */
.page-admin .admin-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-admin .admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-admin .admin-form button[type="submit"] {
    margin-top: 14px;
}

/* Responsive adjustments for admin panel grid and lists */
@media (max-width: 1024px) {
    .page-admin .admin-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.page-admin .user-list-wrapper {
    overflow-x: auto;
    width: 100%;
}

.page-admin .user-list-header,
.page-admin .user-row {
    min-width: unset;
}

/* Custom Tooltip style for admin user list activities */
.user-col-activities {
    position: relative;
}
.user-col-activities::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    background: rgba(13, 19, 31, 0.98);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.7);
    pointer-events: none;
    opacity: 0;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.user-col-activities:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}