/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DEVELOPER TERMINAL â€” KING MODE
   Strategic Tech Blue Â· Strategic Guidance Â· Absolute Command
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #050a14;
    --card-bg: rgba(20, 25, 40, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --gradient-main: linear-gradient(135deg, #6366f1, #8b5cf6);

    --font-heading: 'Outfit', sans-serif;
    --font-hero: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Keep some dev-specific colors but modernize them */
    --dev-primary: #8b5cf6;
    --dev-primary-light: #c084fc;
    --dev-primary-glow: rgba(139, 92, 246, 0.2);
    --dev-text: #ffffff;
    --dev-text-muted: #94a3b8;
    --dev-card-bg: rgba(15, 23, 42, 0.8);
    --dev-border: rgba(255, 255, 255, 0.1);
}

/* â•â•â•â•â•â•â•â•â•â•â• BASE BODY â•â•â•â•â•â•â•â•â•â•â• */
body.developer-terminal {
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
}

/* â•â•â•â•â•â•â•â•â•â•â• SCROLLBAR â•â•â•â•â•â•â•â•â•â•â• */
/* â• â• â• â• â• â• â• â• â• â• â•  SCROLLBAR â• â• â• â• â• â• â• â• â• â• â•  */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb {
    background: rgba(217, 70, 239, 0.5);
    border-radius: 6px;
    transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover { background: rgba(217, 70, 239, 0.7); }

/* ═══ NEWSPAPER TOP BAR ═══ */
.newspaper-top-bar {
    display: none; /* We will replace this with a modern header in HTML */
}

.newspaper-top-bar::before {
    content: '';
    position: absolute;
    top: 3px; left: 0; right: 0;
    height: 1px;
    background: rgba(212, 196, 168, 0.2);
}

.newspaper-top-bar::after {
    content: '';
    position: absolute;
    bottom: 3px; left: 0; right: 0;
    height: 1px;
    background: rgba(212, 196, 168, 0.2);
}

.ntb-left, .ntb-right {
    flex: 1;
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.ntb-left {
    justify-content: flex-start;
}

.ntb-right {
    justify-content: flex-end;
    gap: 1rem;
}

.ntb-center {
    flex: 2;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--dev-primary-light);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.ntb-date {
    font-family: 'JetBrains Mono', monospace;
    color: var(--dev-text-muted);
}

.ntb-price {
    font-weight: 600;
    color: var(--dev-text-muted);
}

.ntb-exit-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgba(239, 68, 68, 0.8);
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ntb-exit-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.6);
    transform: scale(1.05);
}

/* â• â• â• â• â• â• â• â• â• â• â•  KING PARTICLE CANVAS â• â• â• â• â• â• â• â• â• â• â•  */
#leader-particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* â• â• â• â• â• â• â• â• â• â• â•  CONTAINER â• â• â• â• â• â• â• â• â• â• â•  */
.developer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.status-dot {
    width: 8px; height: 8px;
    background: var(--dev-accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--dev-accent-glow), 0 0 25px var(--dev-accent-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.6; }
}

.exit-btn {
    width: 36px; height: 36px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
    color: var(--dev-danger);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.exit-btn:hover {
    background: rgba(239,68,68,0.25);
    box-shadow: 0 0 20px var(--dev-danger-glow);
    transform: scale(1.1);
}

/* â•â•â•â•â•â•â•â•â•â•â• TERMINAL BODY â•â•â•â•â•â•â•â•â•â•â• */
.terminal-body {
    display: flex;
    flex-direction: column;
    gap: 4rem; /* Breathing space between major sections */
}

/* â•â•â•â•â•â•â•â•â•â•â• HERO SECTION â•â•â•â•â•â•â•â•â•â•â• */
.hero-section {
    text-align: center;
    position: relative;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.leader-icon {
    font-size: 3.5rem;
    display: block;
    margin: 0 auto 1rem;
    animation: crownFloat 3s ease-in-out infinite;
    filter: none;
    line-height: 1;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%       { transform: translateY(-8px) rotate(2deg); }
}

.leader-greeting {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.9;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 0.8; transform: translateY(0); }
}

.glitch-title {
    font-family: var(--font-hero);
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

@keyframes titleGlow {
    0%, 100% { filter: none; }
    50%       { filter: none; }
}

.glitch-title::before,
.glitch-title::after {
    display: none;
}

.hero-subtitle {
    font-size: 1rem;
    max-width: 580px;
    margin: 1.25rem auto 0;
    line-height: 1.8;
    color: rgba(148,163,184,0.85);
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* â•â•â•â•â•â•â•â•â•â•â• ROYAL DIVIDER â•â•â•â•â•â•â•â•â•â•â• */
.royal-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem auto 2.5rem;
    max-width: 400px;
    opacity: 0.5;
}

.royal-divider::before,
.royal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dev-primary));
}

.royal-divider::after {
    background: linear-gradient(90deg, var(--dev-primary), transparent);
}

.royal-divider-gem {
    font-size: 0.85rem;
    color: var(--dev-primary);
}

/* ═══════════ DEV GRID ═══════════ */
.dev-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .dev-grid { grid-template-columns: 1fr; }
}

/* ═══════════ GLASS CARDS ═══════════ */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    border: 1px solid var(--dev-border);
    padding: 1.25rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    display: none;
}

.glass-card::after {
    display: none;
}

.glass-card:hover {
    border-color: var(--dev-primary);
}

.card-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
}

/* ═══════════ CARD HEADER ═══════════ */
.card-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem; /* More space between icon and text */
}

.title-wrap h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.icon-box {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.glass-card:hover .icon-box {
    box-shadow: 0 0 30px rgba(212, 196, 168,0.25);
    transform: rotate(-5deg) scale(1.05);
}

.badge-active {
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 2rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #10b981;
    text-shadow: 0 0 10px rgba(16,185,129,0.3);
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════ GATE STATUS PANEL ═══════════ */
.gate-status-panel {
    background: rgba(0,0,0,0.45);
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.gate-status-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(212, 196, 168,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.status-main { display: flex; flex-direction: column; gap: 0.5rem; }

.status-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--dev-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-family: 'JetBrains Mono', monospace;
}

#maintenance-status-msg {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.gate-toggle-btn {
    padding: 1.1rem 2.2rem;
    border-radius: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    cursor: pointer;
    border: 1px solid rgba(212, 196, 168,0.3);
    background: linear-gradient(135deg, rgba(212, 196, 168,0.15), rgba(212, 196, 168,0.05));
    color: var(--dev-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.gate-toggle-btn.btn-locked {
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.05));
    border-color: rgba(16,185,129,0.4);
    color: #34d399;
    text-shadow: none;
    box-shadow: 0 0 25px rgba(16,185,129,0.15);
}

.gate-toggle-btn.btn-open {
    background: linear-gradient(135deg, rgba(239,68,68,0.25), rgba(239,68,68,0.05));
    border-color: rgba(239,68,68,0.4);
    color: #ef4444;
    text-shadow: none;
    box-shadow: 0 0 25px rgba(239,68,68,0.15);
}

.gate-toggle-btn:hover {
    transform: scale(1.05) translateY(-2px);
}

.gate-toggle-btn.btn-locked:hover {
    border-color: #34d399;
    box-shadow: 0 0 35px rgba(16,185,129,0.3), 0 0 80px rgba(16,185,129,0.1);
}

.gate-toggle-btn.btn-open:hover {
    border-color: #ef4444;
    box-shadow: 0 0 35px rgba(239,68,68,0.3), 0 0 80px rgba(239,68,68,0.1);
}

.gate-desc {
    font-size: 0.75rem;
    color: rgba(148,163,184,0.7);
    line-height: 1.5;
}

/* ═══════════ LOG WINDOW ═══════════ */
.terminal-log-window {
    background: rgba(0,0,0,0.45);
    height: 260px;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.79rem;
    overflow-y: auto;
    border: 1px solid rgba(212, 196, 168,0.07);
    position: relative;
    line-height: 1.6;
}

.terminal-log-window::before {
    content: 'â¬¤  â¬¤  â¬¤';
    display: block;
    color: rgba(212, 196, 168,0.25);
    font-size: 0.45rem;
    letter-spacing: 0.2rem;
    margin-bottom: 1rem;
}

.log-line {
    margin-bottom: 0.4rem;
    color: rgba(148,163,184,0.8);
    display: flex;
    gap: 0.65rem;
    line-height: 1.6;
}

.log-line::before {
    content: '›';
    color: rgba(212, 196, 168,0.6);
    font-size: 0.9rem;
    margin-top: -0.05rem;
    flex-shrink: 0;
}

.ip-lookup {
    color: var(--dev-primary);
    cursor: pointer;
    border-bottom: 1px dashed rgba(212, 196, 168, 0.3);
    transition: all 0.2s ease;
}

.ip-lookup:hover {
    color: var(--dev-primary-light);
    border-bottom-color: var(--dev-primary);
    background: rgba(212, 196, 168, 0.1);
    padding: 0 2px;
    border-radius: 2px;
}

/* â•â•â•â•â•â•â•â•â•â•â• DIAGNOSTIC CARDS â•â•â•â•â•â•â•â•â•â•â• */
.diag-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 1200px) {
    .diag-group { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .diag-group { grid-template-columns: 1fr; }
}

.diag-card {
    background: var(--card-bg);
    padding: 1.75rem;
    border-radius: 1.5rem;
    border: 1px solid var(--dev-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.diag-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 196, 168,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.diag-card:hover {
    border-color: rgba(212, 196, 168,0.25);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4), 0 0 40px rgba(212, 196, 168,0.05);
}

.diag-card:hover::before { opacity: 1; }

.diag-icon {
    font-size: 1.4rem;
    color: var(--dev-primary);
    text-shadow: 0 0 15px rgba(212, 196, 168, 0.4);
    opacity: 0.9;
}

.diag-info { display: flex; flex-direction: column; gap: 0.45rem; }

.diag-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--dev-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: 'Inter', sans-serif;
    opacity: 0.8;
}

.diag-value {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--dev-text);
    letter-spacing: 0.02em;
}

.diag-bar {
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 2px;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: scan 2.5s infinite linear;
}

@keyframes scan {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

/* â•â•â•â•â•â•â•â•â•â•â• FOOTER â•â•â•â•â•â•â•â•â•â•â• */
.terminal-footer {
    margin-top: auto;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--dev-text-muted);
    border-top: 1px solid var(--dev-border);
    position: relative;
}

.terminal-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 196, 168,0.25), transparent);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-left::before {
    content: '\2655';
    color: var(--dev-primary);
    font-size: 0.85rem;
    text-shadow: none;
}

.footer-right {
    color: var(--dev-primary);
    opacity: 0.7;
    letter-spacing: 0.08em;
}

/* â•â•â•â•â•â•â•â•â•â•â• AUTH GUARD â•â•â•â•â•â•â•â•â•â•â• */
.management-scene {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.hidden { display: none !important; }

/* â•â•â•â•â•â•â•â•â•â•â• ENTRANCE ANIMATIONS â•â•â•â•â•â•â•â•â•â•â• */
.terminal-navbar  { animation: slideDown 0.5s ease both; }
.hero-section     { animation: fadeUp 0.6s 0.2s ease both; }
.glass-card       { animation: fadeUp 0.6s 0.4s ease both; }
.diag-group       { animation: fadeUp 0.6s 0.6s ease both; }
.terminal-footer  { animation: fadeUp 0.5s 0.8s ease both; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   KINGDOM PAGES SECTION
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.pages-section {
    animation: fadeUp 0.6s 0.7s ease both;
}

.pages-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--dev-border);
    position: relative;
}

.pages-section-header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 196, 168,0.3), transparent);
}

.pages-section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dev-text);
    letter-spacing: 0.01em;
    margin: 0 0 0.2rem;
}

.pages-section-sub {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    color: rgba(148,163,184,0.65);
    margin: 0;
    letter-spacing: 0.01em;
}

.pages-count-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--dev-primary);
    background: linear-gradient(135deg, rgba(212, 196, 168,0.12), rgba(212, 196, 168,0.04));
    border: 1px solid rgba(212, 196, 168,0.25);
    border-radius: 2rem;
    padding: 0.35rem 1rem;
    text-shadow: none;
    flex-shrink: 0;
}

/* â”€â”€ Page Cards Grid â”€â”€ */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem; /* Increased from 1.25rem for breathing space */
}

@media (max-width: 1280px) { .pages-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1024px) { .pages-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .pages-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .pages-grid { grid-template-columns: 1fr; } }

.page-card {
    background: var(--dev-card-bg);
    border: 1px solid var(--dev-border);
    border-radius: 1.25rem; /* Slightly more rounded */
    padding: 1.6rem; /* Increased from 1.35rem for breathing space */
    display: flex;
    flex-direction: column;
    gap: 0.7rem; /* Increased from 0.6rem */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: default;
}

.page-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 196, 168,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.page-card:hover {
    border-color: rgba(212, 196, 168,0.28);
    transform: translateY(-5px);
    box-shadow:
        0 16px 40px rgba(0,0,0,0.45),
        0 0 40px rgba(212, 196, 168,0.05);
}

.page-card:hover::before { opacity: 1; }

/* Current page highlight */
.page-card-current {
    border-color: rgba(212, 196, 168,0.3);
    background: linear-gradient(160deg, rgba(212, 196, 168,0.06) 0%, var(--dev-card-bg) 60%);
    box-shadow: 0 0 30px rgba(212, 196, 168,0.06);
}

.page-card-current::before { opacity: 1; }

/* Card top row */
.page-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.page-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, rgba(212, 196, 168,0.12), rgba(212, 196, 168,0.04));
    border: 1px solid rgba(212, 196, 168,0.18);
    border-radius: 0.7rem;
    display: flex; align-items: center; justify-content: center;
    color: var(--dev-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.page-card:hover .page-icon {
    box-shadow: 0 0 20px rgba(212, 196, 168,0.2);
    transform: rotate(-4deg) scale(1.08);
}

/* Role badges */
.page-role-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    border-radius: 2rem;
    border: 1px solid;
    flex-shrink: 0;
}

.page-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.current-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--dev-primary);
    background: rgba(212, 196, 168,0.1);
    border: 1px solid rgba(212, 196, 168,0.25);
    border-radius: 2rem;
    padding: 0.1rem 0.45rem;
}

/* Route */
.page-route {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: rgba(148,163,184,0.55);
    letter-spacing: 0.02em;
}

/* Description */
.page-desc {
    font-size: 0.8rem;
    color: rgba(148,163,184,0.75);
    line-height: 1.65;
    flex: 1;
    margin: 0;
    letter-spacing: 0.01em;
}

/* Meta footer */
.page-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.page-size {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--dev-text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.page-size i { color: rgba(212, 196, 168,0.4); font-size: 0.6rem; }

.page-open-btn {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent-color);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 0.75rem;
    padding: 0.4rem 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.page-open-btn:hover {
    background: rgba(212, 196, 168,0.18);
    border-color: rgba(212, 196, 168,0.45);
    box-shadow: 0 0 16px rgba(212, 196, 168,0.15);
    transform: scale(1.04);
}

.page-open-disabled {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--dev-primary);
    opacity: 0.5;
    cursor: default;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DEV WALL â€” PRIVATE STICKY NOTES
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.devwall-section {
    animation: fadeUp 0.6s 0.85s ease both;
}

/* â”€â”€ Section header â”€â”€ */
.devwall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--dev-border);
    position: relative;
}

.devwall-header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 196, 168,0.25), transparent);
}

.devwall-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0 0 0.2rem;
}

.devwall-sub {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.devwall-add-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.devwall-add-btn:hover {
    background: linear-gradient(135deg, rgba(212, 196, 168,0.18), rgba(212, 196, 168,0.08));
    border-color: rgba(212, 196, 168,0.45);
    box-shadow: 0 0 20px rgba(212, 196, 168,0.12);
    transform: translateY(-1px);
}

/* â”€â”€ The Board â”€â”€ */
.devwall-board {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(60,40,20,0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(40,30,10,0.2) 0%, transparent 60%),
        rgba(14, 10, 6, 0.55);
    border: 1px solid rgba(100,70,30,0.2);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    min-height: 220px;
    position: relative;
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.4),
        inset 0 0 60px rgba(0,0,0,0.2),
        0 8px 32px rgba(0,0,0,0.4);
}

/* Board texture dots */
.devwall-board::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

/* â”€â”€ Notes Wall Grid (inside the board) â”€â”€ */
.devwall-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 1.5rem;
    align-items: flex-start;
}

/* â”€â”€ Empty State â”€â”€ */
.devwall-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(148,163,184,0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
}

.devwall-empty i {
    font-size: 1.8rem;
    opacity: 0.3;
    transform: rotate(-15deg);
}

.devwall-empty p {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    margin: 0;
    letter-spacing: 0.02em;
}

/* â”€â”€ Sticky Note Card â”€â”€ */
.sticky-note {
    width: 200px;
    min-height: 180px;
    padding: 2.25rem 1.1rem 1.1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    cursor: default;
    animation: noteIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
    /* folded-corner shadow */
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
    transition: filter 0.25s ease, transform 0.25s ease;
    flex-shrink: 0;
}

@keyframes noteIn {
    from { opacity: 0; transform: var(--note-rotate, rotate(0deg)) scale(0.82); }
    to   { opacity: 1; transform: var(--note-rotate, rotate(0deg)) scale(1); }
}

.sticky-note:hover {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    transform: var(--note-hover-rotate, rotate(0deg)) translateY(-6px) scale(1.04);
    z-index: 10;
}

/* Paper background */
.sticky-note .note-paper {
    position: absolute;
    inset: 0;
    border-radius: 2px 2px 2px 2px;
    background: var(--note-bg, #f5e642);
    /* folded corner via clip-path */
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

/* Folded corner triangle */
.sticky-note .note-paper::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 20px; height: 20px;
    background: var(--note-fold, rgba(0,0,0,0.18));
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

/* Push-pin */
.sticky-note .note-pin {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
}

.sticky-note .note-pin .pin-head {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff6b6b, #c0392b);
    box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.3);
}

.sticky-note .note-pin .pin-shaft {
    width: 2px;
    height: 10px;
    background: linear-gradient(180deg, #888, #555);
    border-radius: 0 0 2px 2px;
}

/* Note content sits above the paper */
.sticky-note .note-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.4rem;
}

.note-card-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    color: rgba(0,0,0,0.85);
    line-height: 1.3;
    flex: 1;
    word-break: break-word;
}

.note-delete-btn {
    background: none;
    border: none;
    color: rgba(0,0,0,0.2);
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.note-delete-btn:hover {
    color: rgba(239, 68, 68, 0.8);
    transform: scale(1.2);
}

.note-body {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(0,0,0,0.7);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
}

.note-timestamp {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: rgba(0,0,0,0.4);
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* â”€â”€ Note color themes â€” real sticky note paper colors â”€â”€ */
.sticky-note.nc-gold {
    --note-bg:  #f9e04b;
    --note-fold: rgba(0,0,0,0.14);
}
.sticky-note.nc-green {
    --note-bg:  #b6f0b0;
    --note-fold: rgba(0,0,0,0.12);
}
.sticky-note.nc-blue {
    --note-bg:  #a8d8f8;
    --note-fold: rgba(0,0,0,0.12);
}
.sticky-note.nc-red {
    --note-bg:  #ffaaaa;
    --note-fold: rgba(0,0,0,0.13);
}
.sticky-note.nc-purple {
    --note-bg:  #dbb6f8;
    --note-fold: rgba(0,0,0,0.13);
}
.sticky-note.nc-slate {
    --note-bg:  #e2e8f0;
    --note-fold: rgba(0,0,0,0.12);
}

/* â”€â”€ Compose Modal â”€â”€ */
.devwall-compose-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,4,7,0.78);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.devwall-compose {
    background: rgba(10,16,32,0.98);
    border: 1px solid rgba(212, 196, 168,0.14);
    border-radius: 1.5rem;
    padding: 2rem;
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow:
        0 30px 60px rgba(0,0,0,0.65),
        0 0 0 1px rgba(212, 196, 168,0.05) inset;
    animation: composeIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes composeIn {
    from { opacity: 0; transform: scale(0.93) translateY(14px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compose-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dev-text);
}

.compose-close {
    background: none;
    border: none;
    color: rgba(148,163,184,0.5);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem;
    transition: color 0.2s ease;
    line-height: 1;
}

.compose-close:hover { color: var(--dev-text); }

.note-title-input,
.note-body-input {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    color: var(--dev-text);
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    resize: none;
    line-height: 1.7;
}

.note-title-input {
    font-weight: 600;
    font-size: 0.92rem;
}

.note-title-input::placeholder,
.note-body-input::placeholder {
    color: rgba(148,163,184,0.3);
}

.note-title-input:focus,
.note-body-input:focus {
    outline: none;
    border-color: rgba(212, 196, 168,0.28);
    box-shadow: 0 0 0 3px rgba(212, 196, 168,0.05);
}

.compose-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Color picker â€” show real sticky note colors */
.color-picker {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-dot {
    width: 20px; height: 20px;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
    box-shadow: 1px 2px 4px rgba(0,0,0,0.3);
}

.color-dot:hover { transform: scale(1.2) rotate(-3deg); }

.color-dot.active {
    border-color: rgba(255,255,255,0.7);
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12), 1px 2px 4px rgba(0,0,0,0.4);
}

.compose-save-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.35rem;
    border-radius: 0.75rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid rgba(212, 196, 168,0.3);
    background: linear-gradient(135deg, rgba(212, 196, 168,0.14), rgba(212, 196, 168,0.05));
    color: var(--dev-primary);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.compose-save-btn:hover {
    background: linear-gradient(135deg, rgba(212, 196, 168,0.24), rgba(212, 196, 168,0.1));
    box-shadow: 0 0 20px rgba(212, 196, 168,0.14);
    transform: translateY(-1px);
}

/* =================================================================
   MOBILE RESPONSIVE -- KING TERMINAL
   Primary: 768px | Small: 480px | XSmall: 360px
================================================================= */

@media (max-width: 768px) {

    /* ── Container ── */
    .developer-container {
        padding: 1rem;
        gap: 1.5rem;
    }

    /* ── Navbar ── */
    .terminal-navbar {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .nav-left { gap: 0.75rem; }
    .terminal-path { display: none; } /* hide path on small screens */
    .nav-right { gap: 0.85rem; }
    .status-indicator { font-size: 0.72rem; gap: 0.5rem; }

    /* ── Hero ── */
    .leader-icon { font-size: 2.5rem; }
    .leader-greeting { font-size: 0.72rem; letter-spacing: 0.2em; }
    .glitch-title { font-size: clamp(2rem, 10vw, 3.2rem); }
    .hero-subtitle {
        font-size: 0.88rem;
        padding: 0 0.5rem;
        margin-top: 0.85rem;
    }
    .royal-divider { margin-bottom: 1.5rem; }

    /* ── Dev Grid (System Gate + Royal Dispatch) ── */
    .dev-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* ── Glass Cards ── */
    .glass-card { padding: 1.4rem; }
    .card-inner { gap: 1.25rem; }

    /* ── Gate Status Panel — stack vertically ── */
    .gate-status-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem 1.25rem;
    }
    .gate-toggle-btn {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1.5rem;
    }
    #maintenance-status-msg { font-size: 1.15rem; }

    /* ── Diagnostics ── */
    .diag-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .diag-card { padding: 1.25rem; }

    /* ── Pages Section ── */
    .pages-section-header { flex-wrap: wrap; gap: 0.75rem; }
    .pages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .page-card { padding: 1.15rem; }

    /* ── Dev Wall ── */
    .devwall-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .devwall-add-btn { width: 100%; justify-content: center; }
    .devwall-board { padding: 1.5rem 1rem; }
    .devwall-grid { gap: 1.5rem; justify-content: center; }
    .sticky-note  { width: 160px; min-height: 160px; }

    /* ── Compose Modal ── */
    .devwall-compose { padding: 1.5rem; }
    .compose-footer { flex-wrap: wrap; gap: 0.75rem; }
    .compose-save-btn { width: 100%; justify-content: center; }

    /* ── Footer ── */
    .terminal-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1.25rem 0;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {

    /* ── Container ── */
    .developer-container { padding: 0.75rem; gap: 1.25rem; }

    /* ── Navbar ── */
    .terminal-badge { font-size: 0.62rem; padding: 0.25rem 0.65rem; }
    .status-indicator span:last-child { display: none; } /* hide uptime text, keep dot */

    /* ── Hero ── */
    .leader-icon { font-size: 2rem; margin-bottom: 0.6rem; }
    .leader-greeting { font-size: 0.65rem; letter-spacing: 0.14em; }
    .glitch-title { font-size: clamp(1.7rem, 11vw, 2.5rem); }
    .hero-subtitle { font-size: 0.82rem; }

    /* ── Glass Cards ── */
    .glass-card { padding: 1.1rem; border-radius: 1rem; }
    .icon-box { width: 40px; height: 40px; font-size: 1rem; }

    /* ── Pages Grid → single column on very small phones ── */
    .pages-grid { grid-template-columns: 1fr; gap: 0.85rem; }
    .page-card { padding: 1rem; }

    /* ── Log Window ── */
    .terminal-log-window { height: 200px; font-size: 0.73rem; }

    /* ── Sticky notes ── */
    .sticky-note { width: 145px; min-height: 150px; }

    /* ── Compose ── */
    .devwall-compose { border-radius: 1.1rem; padding: 1.25rem; }
}

/* Ambient Background blobs */
body.developer-terminal::before,
body.developer-terminal::after {
  content: '';
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.4;
  animation: float-blobs 20s infinite alternate ease-in-out;
  will-change: transform;
}

body.developer-terminal::before {
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, #7c3aed, transparent);
}

body.developer-terminal::after {
  bottom: -10%;
  right: -10%;
  background: radial-gradient(circle, #db2777, transparent);
  animation-delay: -10s;
}

@keyframes float-blobs {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 50px) scale(1.1); }
}

@media (max-width: 768px) {
    .developer-container { padding: 1rem; }
    .diag-group { grid-template-columns: 1fr; }
    .pages-grid { grid-template-columns: 1fr; }
}
