:root {
    /* Solarized Dark Palette */
    --c-base03: #002b36;
    --c-base02: #073642;
    --c-base01: #002b36;
    --c-base00: #657b83;
    --c-base0: #839496;
    --c-base1: #93a1a1;
    --c-base2: #eee8d5;
    --c-base3: #fdf6e3;
    
    /* Solarized Accents */
    --c-yellow: #b58900;
    --c-orange: #cb4b16;
    --c-red: #dc322f;
    --c-magenta: #d33682;
    --c-violet: #6c71c4;
    --c-blue: #268bd2;
    --c-cyan: #2aa198;
    --c-green: #859900;
    
    /* Dashboard specific */
    --c-primary: var(--c-blue);
    --c-primary-alt: #225d80;
    --c-secondary: var(--c-cyan);
    --c-accent: var(--c-cyan);
    --c-success: var(--c-green);
    --c-error: var(--c-red);
    --c-warning: var(--c-orange);
    --c-muted: var(--c-base01);
    --c-text: var(--c-base0);
    --c-text-light: var(--c-base01);
    --c-bg: var(--c-base02);
    --c-bg-alt: var(--c-base01);
    --c-border: var(--c-base01);
    --border-radius: 6px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Roboto Mono', monospace;
    background: var(--c-base03);
    color: var(--c-base0);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Theme (Modern Dark) */
body.theme-dark-modern {
    --c-base03: #0a0e1a;
    --c-base02: #141a2e;
    --c-base01: #1a2238;
    --c-base00: #2a3448;
    --c-base0: #a0aec0;
    --c-base1: #cbd5e0;
    --c-base2: #e2e8f0;
    --c-base3: #f7fafc;
    
    --c-yellow: #fbbf24;
    --c-orange: #f97316;
    --c-red: #ef4444;
    --c-magenta: #d946ef;
    --c-violet: #8b5cf6;
    --c-blue: #3b82f6;
    --c-cyan: #06b6d4;
    --c-green: #10b981;
    
    --c-bg: var(--c-base02);
    --c-bg-alt: var(--c-base01);
    --c-text: var(--c-base0);
    --c-text-light: var(--c-base01);
    --c-border: var(--c-base00);
}

/* Nord Theme */
body.theme-nord {
    --c-base03: #2e3440;
    --c-base02: #3b4252;
    --c-base01: #434c5e;
    --c-base00: #4c566a;
    --c-base0: #d8dee9;
    --c-base1: #e5e9f0;
    --c-base2: #eceff4;
    --c-base3: #f8f9fc;
    
    --c-yellow: #ebcb8b;
    --c-orange: #d08770;
    --c-red: #bf616a;
    --c-magenta: #b48ead;
    --c-violet: #81a1c1;
    --c-blue: #88c0d0;
    --c-cyan: #8fbcbb;
    --c-green: #a3be8c;
    
    --c-bg: var(--c-base02);
    --c-bg-alt: var(--c-base01);
    --c-text: var(--c-base0);
    --c-text-light: var(--c-base01);
    --c-border: var(--c-base00);
}

/* Theme Switcher Button Styles */
.theme-switcher-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-switcher-btn {
    background: var(--c-base01);
    border: 2px solid var(--c-cyan);
    color: var(--c-base2);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
    position: relative;
}

.theme-switcher-btn:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--c-cyan);
    color: var(--c-base03);
    box-shadow: 0 8px 20px rgba(42, 161, 152, 0.4);
}

.theme-dropdown {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--c-base01);
    border: 1px solid var(--c-border);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    min-width: 180px;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s ease;
}

.theme-dropdown.active {
    display: flex;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    color: var(--c-base2);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-family: inherit;
    font-size: 0.9rem;
    width: 100%;
}

.theme-option:hover {
    background: var(--c-bg-alt);
    transform: translateX(4px);
}

.theme-option.active {
    background: var(--c-cyan);
    color: var(--c-base03);
}

.theme-option-icon {
    font-size: 1.2rem;
}

/* Responsive adjustments for theme switcher */
@media (max-width: 768px) {
    .theme-switcher-wrapper {
        bottom: 15px;
        right: 15px;
    }
    
    .theme-switcher-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .theme-dropdown {
        min-width: 160px;
        bottom: 50px;
    }
    
    .theme-option {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Purple Dream Theme (Dark) */
body.theme-purple-dream {
    --c-base03: #0a0a14;
    --c-base02: #12121f;
    --c-base01: #1a1a2e;
    --c-base00: #2a2a4a;
    --c-base0: #c4c4e0;
    --c-base1: #d8d8f0;
    --c-base2: #e8e8ff;
    --c-base3: #f5f5ff;
    
    --c-yellow: #f4d03f;
    --c-orange: #e67e22;
    --c-red: #e74c3c;
    --c-magenta: #c0392b;
    --c-violet: #a569bd;
    --c-blue: #5dade2;
    --c-cyan: #48c9b0;
    --c-green: #52be80;
    
    --c-primary: #9b59b6;
    --c-primary-alt: #8e44ad;
    --c-secondary: #a569bd;
    --c-accent: #bb8fce;
    --c-success: #52be80;
    --c-error: #e74c3c;
    --c-warning: #f39c12;
    
    --c-bg: var(--c-base02);
    --c-bg-alt: var(--c-base01);
    --c-text: var(--c-base0);
    --c-text-light: var(--c-base01);
    --c-border: #2a2a4a;
}

/* Adjust gradient for purple theme */
body.theme-purple-dream .service-brick.up {
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(155, 89, 182, 0.15) 100%);
}

body.theme-purple-dream .service-brick.up:hover {
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(155, 89, 182, 0.25) 100%);
}

body.theme-purple-dream .nav-btn:hover,
body.theme-purple-dream .nav-btn.active {
    background: #9b59b6;
    border-color: #9b59b6;
}

/* Emerald Forest Theme (Dark Green) */
body.theme-emerald-forest {
    --c-base03: #05140a;
    --c-base02: #0a1f12;
    --c-base01: #0f2e1a;
    --c-base00: #1a4530;
    --c-base0: #a8d5b8;
    --c-base1: #c5e5d3;
    --c-base2: #e0f5e8;
    --c-base3: #f0faf5;
    
    --c-yellow: #f1c40f;
    --c-orange: #e67e22;
    --c-red: #e74c3c;
    --c-magenta: #c0392b;
    --c-violet: #9b59b6;
    --c-blue: #3498db;
    --c-cyan: #1abc9c;
    --c-green: #2ecc71;
    
    --c-primary: #27ae60;
    --c-primary-alt: #229954;
    --c-secondary: #2ecc71;
    --c-accent: #58d68d;
    --c-success: #2ecc71;
    --c-error: #e74c3c;
    --c-warning: #f39c12;
    
    --c-bg: var(--c-base02);
    --c-bg-alt: var(--c-base01);
    --c-text: var(--c-base0);
    --c-text-light: var(--c-base01);
    --c-border: #1a4530;
}

/* Adjust gradient for green theme */
body.theme-emerald-forest .service-brick.up {
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(46, 204, 113, 0.12) 100%);
}

body.theme-emerald-forest .service-brick.up:hover {
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(46, 204, 113, 0.22) 100%);
}

body.theme-emerald-forest .nav-btn:hover,
body.theme-emerald-forest .nav-btn.active {
    background: #27ae60;
    border-color: #27ae60;
}

/* Ocean Depths Theme (Dark Blue) */
body.theme-ocean-depths {
    --c-base03: #0a1128;
    --c-base02: #0f1a3a;
    --c-base01: #14264d;
    --c-base00: #1e3a6b;
    --c-base0: #a8c8f0;
    --c-base1: #c8dcf5;
    --c-base2: #e0ecfa;
    --c-base3: #f0f5ff;
    
    --c-yellow: #f39c12;
    --c-orange: #e67e22;
    --c-red: #e74c3c;
    --c-magenta: #c0392b;
    --c-violet: #9b59b6;
    --c-blue: #3498db;
    --c-cyan: #00a8ff;
    --c-green: #2ecc71;
    
    --c-primary: #2980b9;
    --c-primary-alt: #2471a3;
    --c-secondary: #3498db;
    --c-accent: #5dade2;
    --c-success: #2ecc71;
    --c-error: #e74c3c;
    --c-warning: #f39c12;
    
    --c-bg: var(--c-base02);
    --c-bg-alt: var(--c-base01);
    --c-text: var(--c-base0);
    --c-text-light: var(--c-base01);
    --c-border: #1e3a6b;
}

/* Adjust gradient for blue theme */
body.theme-ocean-depths .service-brick.up {
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(52, 152, 219, 0.12) 100%);
}

body.theme-ocean-depths .service-brick.up:hover {
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(52, 152, 219, 0.22) 100%);
}

body.theme-ocean-depths .nav-btn:hover,
body.theme-ocean-depths .nav-btn.active {
    background: #2980b9;
    border-color: #2980b9;
}

/* Optional: Sunset Glow Theme (Dark Orange/Red) - Bonus theme */
body.theme-sunset-glow {
    --c-base03: #1a0a0a;
    --c-base02: #2a1212;
    --c-base01: #3a1a1a;
    --c-base00: #552828;
    --c-base0: #e8c8c8;
    --c-base1: #f0d8d8;
    --c-base2: #fae8e8;
    --c-base3: #fff5f5;
    
    --c-yellow: #f4d03f;
    --c-orange: #e67e22;
    --c-red: #e74c3c;
    --c-magenta: #c0392b;
    --c-violet: #9b59b6;
    --c-blue: #5dade2;
    --c-cyan: #48c9b0;
    --c-green: #52be80;
    
    --c-primary: #e67e22;
    --c-primary-alt: #d35400;
    --c-secondary: #e74c3c;
    --c-accent: #f39c12;
    --c-success: #52be80;
    --c-error: #e74c3c;
    --c-warning: #f39c12;
    
    --c-bg: var(--c-base02);
    --c-bg-alt: var(--c-base01);
    --c-text: var(--c-base0);
    --c-text-light: var(--c-base01);
    --c-border: #552828;
}

/* Adjust gradient for sunset theme */
body.theme-sunset-glow .service-brick.up {
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(230, 126, 34, 0.12) 100%);
}

body.theme-sunset-glow .service-brick.up:hover {
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(230, 126, 34, 0.22) 100%);
}

body.theme-sunset-glow .nav-btn:hover,
body.theme-sunset-glow .nav-btn.active {
    background: #e67e22;
    border-color: #e67e22;
}

/* Ensure all elements use CSS variables consistently */
body.theme-purple-dream .side-widget-header,
body.theme-emerald-forest .side-widget-header,
body.theme-ocean-depths .side-widget-header,
body.theme-sunset-glow .side-widget-header {
    border-bottom-color: var(--c-accent);
}

body.theme-purple-dream .service-link,
body.theme-emerald-forest .service-link,
body.theme-ocean-depths .service-link,
body.theme-sunset-glow .service-link {
    color: var(--c-accent);
}

body.theme-purple-dream .service-link:hover,
body.theme-emerald-forest .service-link:hover,
body.theme-ocean-depths .service-link:hover,
body.theme-sunset-glow .service-link:hover {
    color: var(--c-primary);
    border-bottom-color: var(--c-primary);
}

.nav {
    position: sticky;
    top: 0;
    z-index: 1001;
    background: var(--c-base03);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--c-base01);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--c-base01);
    color: var(--c-base0);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--c-accent);
    color: var(--c-base03);
    border-color: var(--c-accent);
    box-shadow: 0 2px 8px rgba(42, 161, 152, 0.3);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-brick {
    background: var(--c-base01);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-left: 5px solid transparent;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Visual feedback for status change */
.service-brick.status-changed {
    animation: statusFlash 0.5s ease;
}

.service-brick::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, transparent 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: var(--transition);
}

.service-brick:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.service-brick:hover::before {
    opacity: 1;
}

.service-brick.up {
    border-left-color: var(--c-green);
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(133, 153, 0, 0.1) 100%);
}

.service-brick.up:hover {
    background: linear-gradient(135deg, #002b36 0%, rgba(133, 153, 0, 0.25) 100%);
}

.service-brick.down {
    border-left-color: #dc322f;
    background: linear-gradient(135deg, var(--c-base01) 0%, rgba(220, 50, 47, 0.18) 100%);
}

.service-brick.down:hover {
    background: linear-gradient(135deg, #002b36 0%, rgba(220, 50, 47, 0.25) 100%);
}

.service-icon {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 1.25rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    border: 2px solid var(--c-base02);
    transition: var(--transition);
}

.service-brick:hover .service-icon {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.service-title {
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--c-base2);
    line-height: 1.3;
}

.service-link {
    color: var(--c-cyan);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.service-link:hover {
    border-bottom-color: var(--c-cyan);
    color: var(--c-accent);
}

.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.bookmark-brick {
    background: var(--c-base01);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-left: 5px solid var(--c-cyan);
    position: relative;
    overflow: hidden;
}

.bookmark-brick:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.bookmark-title {
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--c-base2);
}

.bookmark-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.bookmark-list a {
    color: var(--c-base2);
    text-decoration: none;
    display: inline-block;
    padding: 0.35rem 0;
    transition: var(--transition);
}

.bookmark-list a:hover {
    color: var(--c-cyan);
    text-decoration: underline;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.youtube-brick {
    background: linear-gradient(135deg, #002b36 0%, #073642 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    transition: var(--transition);
    border-left: 5px solid #2aa198;
    position: relative;
    overflow: hidden;
}

.youtube-brick:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.youtube-title {
    font-size: 1.35rem;
    font-weight: 500;
    color: #eee8d5;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.youtube-videos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.youtube-video {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(7, 54, 66, 0.85);
    border: 1px solid rgba(131, 148, 150, 0.18);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.youtube-video:hover {
    transform: translateY(-3px);
    border-color: rgba(42, 161, 152, 0.5);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.youtube-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #001f27;
}

.youtube-video-title {
    padding: 0.85rem 0.9rem 0.95rem;
    color: #fdf6e3;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
}

.youtube-empty,
.youtube-loading {
    color: #93a1a1;
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.youtube-loading {
    position: relative;
    padding-left: 1.3rem;
}

.youtube-loading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.25rem;
    width: 0.8rem;
    height: 0.8rem;
    border: 2px solid rgba(42, 161, 152, 0.25);
    border-top-color: #2aa198;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@media (max-width: 768px) {
    .youtube-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--c-base00);
}

.status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    background: rgba(0,0,0,0.2);
}

.status.up {
    color: #859900 !important;
    background: rgba(133, 153, 0, 0.15) !important;
}

.status.down {
    color: #dc322f !important;
    background: rgba(220, 50, 47, 0.15) !important;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.status.up .status-dot {
    background: #859900 !important;   /* UP dot matches text */
    box-shadow: 0 0 12px rgba(133, 153, 0, 0.5);
}

.status.down .status-dot {
    background: #dc322f !important;   /* DOWN dot matches text */
    animation: pulse 2s infinite;
    box-shadow: 0 0 12px rgba(220, 50, 47, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.last-check {
    font-size: 0.9rem;
    color: rgba(217, 240, 69, 0.866);
    font-family: 'SF Mono', monospace;
    background: rgba(134, 73, 172, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--c-base01);
    font-size: 1.1rem;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--c-base01);
    border-top: 2px solid var(--c-cyan);
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-left: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: rgba(220, 50, 47, 0.15);
    color: var(--c-red);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--c-red);
    margin: 2rem 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 50, 47, 0.3);
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .container {
        padding: 1.25rem;
    }
    
    .header {
        padding: 1.25rem;
    }
    
    .nav {
        padding: 0.5rem 1.25rem;
        gap: 0.25rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}
.service-grid-block,
.bookmarks-block,
.youtube-block {
    margin-bottom: 2rem;
}

.service-grid-block-title,
.bookmarks-block-title,
.youtube-block-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--c-base2);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--c-cyan);
    text-transform: capitalize;
}

.youtube-channel {
    background: var(--c-base01);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.youtube-channel-title {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--c-base2);
    margin-bottom: 1rem;
}
.footer {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--c-base01);
    border-top: 1px solid var(--c-base00);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: var(--box-shadow);
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--c-base02);
    border-radius: var(--border-radius);
    color: var(--c-base2);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border: 1px solid var(--c-base00);
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.footer-link:hover {
    background: var(--c-cyan);
    color: var(--c-base03);
    border-color: var(--c-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(42, 161, 152, 0.2);
}

.footer-link i, .footer-link span {
    font-size: 1.3rem;
}

.footer-separator {
    color: var(--c-base0);
    font-size: 1.2rem;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 1rem;
        border-radius: 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-separator {
        display: none;
    }
    
    .footer-link {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Sub-grid styles */
.sub-grid-section {
    margin-bottom: 2rem;
    background: rgba(7, 54, 66, 0.3);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(131, 148, 150, 0.2);
}

.services-grid.with-subgrids {
    display: block;
    gap: 0;
}

.sub-grid-section:last-child {
    margin-bottom: 0;
}

.sub-grid-header {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--c-cyan);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(42, 161, 152, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sub-grid-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.sub-grid-empty {
    color: var(--c-base0);
    font-style: italic;
    padding: 1rem;
    text-align: center;
    opacity: 0.7;
}

/* When sub-grids are present, adjust the main services grid */
.services-grid:has(.sub-grid-section) {
    display: block;
    gap: 0;
}

/* Responsive adjustments for sub-grids */
@media (max-width: 768px) {
    .sub-grid-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .sub-grid-header {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .sub-grid-items {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Service brick adjustments inside sub-grids */
.sub-grid-items .service-brick {
    padding: 1.25rem;
}

.sub-grid-items .service-icon {
    width: 56px;
    height: 56px;
}

.sub-grid-items .service-title {
    font-size: 1.2rem;
}

/* Ensure bricks in sub-grids still have proper hover effects */
.sub-grid-items .service-brick:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}

@keyframes statusFlash {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); background: rgba(42, 161, 152, 0.2); }
    100% { transform: scale(1); }
}

/* Page layout with side panels */
.page-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.page-main-content {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
}

/* Side panels */
.side-panel {
    width: 280px;
    min-width: 280px;
    position: sticky;
    top: 1rem;
    align-self: flex-start;
}

.side-panel.side-left {
    order: -1; /* Ensure left panel stays left */
}

.side-widget {
    background: var(--c-base01);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(131, 148, 150, 0.2);
}

.side-widget:last-child {
    margin-bottom: 0;
}

.side-widget-header {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--c-cyan);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(42, 161, 152, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Side buttons */
.side-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.side-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--c-base02);
    border: 1px solid rgba(131, 148, 150, 0.3);
    border-radius: var(--border-radius);
    color: var(--c-base2);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.side-button:hover {
    background: rgba(42, 161, 152, 0.1);
    border-color: var(--c-cyan);
    transform: translateX(4px);
}

.side-button:active {
    transform: translateX(2px) scale(0.98);
}

.side-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.side-button.loading::after {
    content: '';
    position: absolute;
    right: 1rem;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(42, 161, 152, 0.3);
    border-top-color: var(--c-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.side-button.success {
    border-color: var(--c-green) !important;
    background: rgba(133, 153, 0, 0.15) !important;
}

.side-button.error {
    border-color: var(--c-red) !important;
    background: rgba(220, 50, 47, 0.15) !important;
}

.side-button-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.side-button-name {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Side time */
.side-time-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.time-location {
    background: var(--c-base02);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    border: 1px solid rgba(131, 148, 150, 0.2);
}

.time-location-name {
    font-size: 0.85rem;
    color: var(--c-base0);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.time-display {
    text-align: center;
}

.time-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-base2);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.time-date {
    font-size: 0.85rem;
    color: var(--c-base0);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

/* Empty state */
.side-empty {
    color: var(--c-base0);
    font-style: italic;
    padding: 0.5rem;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .page-layout {
        flex-direction: column;
    }
    
    .side-panel {
        width: 100%;
        min-width: 100%;
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .side-panel.side-left {
        order: 0;
    }
    
    .side-widget {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .side-panel {
        grid-template-columns: 1fr;
    }
    
    .side-button {
        padding: 0.65rem 0.85rem;
    }
    
    .side-widget {
        padding: 1rem;
    }
}

/* Side info styles */
.side-info-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    background: var(--c-base02);
    border-radius: var(--border-radius);
    border: 1px solid rgba(131, 148, 150, 0.2);
    overflow: hidden;
}

.info-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(7, 54, 66, 0.5);
    border-bottom: 1px solid rgba(131, 148, 150, 0.2);
}

.info-item-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.info-item-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--c-base2);
}

.info-item-description {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--c-base0);
    background: rgba(7, 54, 66, 0.3);
    border-bottom: 1px solid rgba(131, 148, 150, 0.1);
}

.info-refresh-btn {
    background: transparent;
    border: 1px solid rgba(131, 148, 150, 0.3);
    border-radius: 4px;
    color: var(--c-base0);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-refresh-btn:hover {
    background: rgba(42, 161, 152, 0.2);
    border-color: var(--c-cyan);
    color: var(--c-cyan);
}

.info-refresh-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.info-refresh-btn.spinning .info-refresh-icon {
    animation: spin 0.8s linear infinite;
}

.info-item-content {
    padding: 0.75rem 1rem;
    min-height: 60px;
    max-height: 300px;
    overflow-y: auto;
}

.info-loading {
    color: var(--c-base0);
    font-style: italic;
    text-align: center;
    padding: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Status display */
.info-status {
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid;
    margin-bottom: 0.5rem;
}

.info-status.success {
    background: rgba(133, 153, 0, 0.15);
    border-left-color: var(--c-green);
}

.info-status.error {
    background: rgba(220, 50, 47, 0.15);
    border-left-color: var(--c-red);
}

.info-status.warning {
    background: rgba(203, 75, 22, 0.15);
    border-left-color: var(--c-orange);
}

.info-status.neutral {
    background: rgba(42, 161, 152, 0.15);
    border-left-color: var(--c-cyan);
}

.info-status-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-base0);
    margin-bottom: 0.25rem;
}

.info-status-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--c-base2);
}

/* Info fields */
.info-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-field {
    padding: 0.5rem;
    background: rgba(7, 54, 66, 0.3);
    border-radius: 4px;
    border-left: 3px solid rgba(42, 161, 152, 0.3);
}

.info-field-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-base0);
    margin-bottom: 0.25rem;
}

.info-field-value {
    font-size: 0.9rem;
    color: var(--c-base2);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    word-break: break-all;
}

/* Info text */
.info-text {
    color: var(--c-base2);
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Info error */
.info-error {
    text-align: center;
    padding: 1rem;
}

.info-error-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.info-error-message {
    color: var(--c-red);
    font-size: 0.85rem;
}

/* Scrollbar styling for info content */
.info-item-content::-webkit-scrollbar {
    width: 4px;
}

.info-item-content::-webkit-scrollbar-track {
    background: transparent;
}

.info-item-content::-webkit-scrollbar-thumb {
    background: rgba(131, 148, 150, 0.3);
    border-radius: 2px;
}

.info-item-content::-webkit-scrollbar-thumb:hover {
    background: rgba(131, 148, 150, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .info-item-content {
        max-height: 200px;
    }
    
    .info-item-header {
        padding: 0.65rem 0.85rem;
    }
}

