/* ==========================================================================
   🎨 ArchaieDASH: Obsidian Aurora Design System & Stylesheet
   ========================================================================== */

/* Import premium typography from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;800&display=swap');

:root {
    /* Color Tokens - Obsidian Aurora Palette */
    --bg-base: #0a0d13;
    --bg-darker: #05070a;
    --glass-bg: rgba(13, 17, 23, 0.55);
    --glass-bg-hover: rgba(22, 28, 38, 0.7);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-border-glow: rgba(0, 242, 254, 0.25);
    
    /* Glowing Neon Accents */
    --accent-cyan: #00f2fe;
    --accent-teal: #4facfe;
    --accent-mint: #00f5a0;
    --accent-indigo: #7f00ff;
    --accent-pink: #ff007f;
    --accent-purple: #9b51e0;
    
    /* Standard Text colors */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Typography */
    --font-header: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Custom premium scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    border: 2px solid var(--bg-darker);
    transition: var(--transition-smooth);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* ==========================================================================
   ✨ Dynamic Animated Backdrops
   ========================================================================== */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(5, 7, 10, 1) 0%, rgba(10, 13, 19, 1) 90%);
}

.aurora-glow-1, .aurora-glow-2, .aurora-glow-3 {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.18;
    pointer-events: none;
    mix-blend-mode: screen;
}

.aurora-glow-1 {
    background: var(--accent-indigo);
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    animation: float1 25s infinite alternate;
}

.aurora-glow-2 {
    background: var(--accent-cyan);
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -100px;
    animation: float2 20s infinite alternate;
}

.aurora-glow-3 {
    background: var(--accent-pink);
    width: 400px;
    height: 400px;
    top: 40%;
    left: 45%;
    animation: float3 30s infinite alternate;
}

@keyframes float1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, 120px) scale(1.2); }
}
@keyframes float2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(120px, -80px) scale(1.15); }
}
@keyframes float3 {
    0% { transform: translate(0, 0) scale(0.9); }
    100% { transform: translate(-80px, -100px) scale(1.1); }
}

/* ==========================================================================
   Glassmorphism Styles
   ========================================================================== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Page Grid Layout (Balanced 3-Column Desktop Setup)
   ========================================================================== */
.dashboard-container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
    display: grid;
    grid-template-columns: 310px 1fr 310px;
    gap: 2.5rem;
    min-height: 100vh;
}

/* Sidebar Column Layouts */
.sidebar-left, .sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Adaptive Layout Balancing */
@media (max-width: 1280px) {
    .dashboard-container {
        grid-template-columns: 290px 1fr; /* Merge right sidebar columns below */
        padding: 2.5rem 1.8rem;
        gap: 2rem;
    }
    
    .sidebar-right {
        grid-column: 1 / -1; /* Stretch to occupy the whole bottom row */
        display: grid;
        grid-template-columns: 1fr 1fr; /* Parallel widget rows */
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 260px 1fr;
    }
    
    .sidebar-right {
        grid-template-columns: 1fr; /* Stack right widgets on narrower screens */
    }
}

@media (max-width: 820px) {
    .dashboard-container {
        grid-template-columns: 1fr; /* Strict single column stacked stack */
        padding: 2rem 1.2rem;
        gap: 2rem;
    }
    
    .sidebar-left, .sidebar-right {
        grid-column: auto;
    }
}

/* ==========================================================================
   Left Header Brand Welcome & Customize Buttons
   ========================================================================== */
.header-module {
    padding: 1.8rem;
    text-align: left;
    position: relative;
}

.header-logo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand-title {
    font-family: var(--font-header);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 0.2rem;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.welcome-msg {
    font-size: 1.1rem;
    margin-top: 1rem;
    font-weight: 400;
    color: var(--text-primary);
}

.welcome-msg span {
    font-weight: 600;
    color: var(--accent-mint);
}

.settings-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.settings-btn:hover {
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    transform: rotate(45deg);
}

/* ==========================================================================
   Widgets Details (Telemetry, Clocks, Notepad, Weather)
   ========================================================================== */
.widget {
    padding: 1.5rem;
}

.widget-title {
    font-family: var(--font-header);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title svg {
    color: var(--accent-cyan);
}

/* Clock Widget */
.clock-widget {
    text-align: center;
    padding: 1.8rem;
}

.clock-time {
    font-family: var(--font-header);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.clock-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* 🌤️ Functional Weather Widgets (Primary & Secondary) */
.weather-container {
    display: flex;
    flex-direction: column;
}

.weather-subtext {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    text-align: center;
    padding: 0.5rem;
}

.weather-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.weather-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weather-temp {
    font-family: var(--font-header);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.weather-icon-glow {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.4));
}

.weather-icon-glow svg {
    width: 36px;
    height: 36px;
}

.weather-status {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.weather-details-row {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.8rem;
    margin-top: 0.4rem;
}

.weather-detail-item {
    display: flex;
    flex-direction: column;
}

.weather-detail-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.1rem;
}

.weather-detail-val {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* 📝 Scratchpad Notepad Widget */
.scratchpad-container {
    width: 100%;
}

.scratchpad-area {
    width: 100%;
    height: 160px;
    background: rgba(5, 7, 10, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.5;
    outline: none;
    resize: none;
    transition: var(--transition-smooth);
}

.scratchpad-area:focus {
    border-color: var(--accent-cyan);
    background: rgba(5, 7, 10, 0.55);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

/* System Stats Widget */
.sys-stats-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stat-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.stat-progress-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.stat-progress-bar {
    height: 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
    position: relative;
    box-shadow: 0 0 10px currentColor;
}

/* ==========================================================================
   🔍 Search Engine Module
   ========================================================================== */
.search-module {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    padding-left: 2.8rem;
    background: rgba(5, 7, 10, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
    background: rgba(5, 7, 10, 0.6);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.search-input:focus + .search-icon {
    color: var(--accent-cyan);
}

.search-engines {
    display: flex;
    justify-content: space-around;
    gap: 0.4rem;
}

.engine-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    padding: 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}

.engine-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.engine-btn.active {
    color: var(--accent-cyan);
    border-color: rgba(0, 242, 254, 0.2);
    background: rgba(0, 242, 254, 0.05);
    font-weight: 600;
}

/* ==========================================================================
   🎛️ Main Service Grid & Service Cards
   ========================================================================== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.grid-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
}

.section-title {
    font-family: var(--font-header);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-count {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    color: var(--text-secondary);
}

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

.service-card {
    position: relative;
    padding: 1.8rem 1.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: flex-start;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-bounce);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    opacity: 1;
    transition: var(--transition-smooth);
}

/* Card hover and glow systems */
.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--theme-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(var(--theme-rgb), 0.2);
}

.service-card:active {
    transform: translateY(-2px);
}

/* Icon Container */
.service-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(var(--theme-rgb), 0.1);
    border: 1px solid rgba(var(--theme-rgb), 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-color);
    transition: var(--transition-smooth);
    position: relative;
    z-index: 2;
    box-shadow: inset 0 0 10px rgba(var(--theme-rgb), 0.1);
}

.service-card:hover .service-icon-wrapper {
    background: var(--theme-color);
    color: var(--bg-base);
    box-shadow: 0 0 15px var(--theme-color);
    border-color: transparent;
    transform: scale(1.05);
}

.service-icon-wrapper svg {
    width: 24px;
    height: 24px;
    transition: var(--transition-smooth);
}

/* Service labels */
.service-info {
    position: relative;
    z-index: 2;
    width: 100%;
}

.service-name {
    font-family: var(--font-header);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.service-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Status Indicator Dot */
.status-indicator {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-mint);
    box-shadow: 0 0 8px var(--accent-mint);
    z-index: 2;
    transition: var(--transition-smooth);
}

.status-indicator.offline {
    background-color: var(--text-muted);
    box-shadow: none;
}

.status-indicator.checking {
    background-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* ==========================================================================
   ⚙️ Left Customize Settings Drawer Overlay
   ========================================================================== */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px;
    height: 100vh;
    z-index: 1000;
    background: rgba(6, 9, 14, 0.4);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-right: 1px solid var(--glass-border);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-overlay.active {
    transform: translateX(0);
}

@media (max-width: 480px) {
    .settings-overlay {
        width: 100vw;
    }
}

.settings-header {
    height: 60px;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(13, 17, 23, 0.8);
}

.settings-title {
    font-family: var(--font-header);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.8rem;
}

.settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-sec-title {
    font-family: var(--font-header);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-cyan);
}

.settings-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.settings-form-row.inline-row {
    flex-direction: row;
    gap: 0.8rem;
}

/* Custom Checkbox Row styling */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
}

.settings-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.label-inline {
    margin-bottom: 0;
    cursor: pointer;
}

.settings-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.settings-input {
    background: rgba(5, 7, 10, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-smooth);
}

.settings-input:focus {
    border-color: var(--accent-cyan);
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.settings-color {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    width: 38px;
    height: 38px;
    cursor: pointer;
}

.settings-color::-webkit-color-swatch {
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.color-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
}

.settings-select {
    background: #0d1117;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.settings-submit-btn {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan));
    border: none;
    color: var(--bg-base);
    padding: 0.75rem;
    border-radius: 8px;
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.15);
}

.settings-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.25);
}

.settings-submit-btn:active {
    transform: translateY(0);
}

.settings-alt-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 8px;
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.settings-alt-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.import-label {
    display: block;
}

/* Manage List of stack bookmarks */
.settings-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.settings-card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
}

.settings-card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.settings-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--dot-color);
}

.settings-card-ctrls {
    display: flex;
    gap: 0.2rem;
}

.settings-item-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-item-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.settings-item-btn-delete:hover {
    color: var(--accent-pink);
    background: rgba(255, 0, 127, 0.1);
}

/* ==========================================================================
   🖼️ Glassmorphic Viewport / Slide-Over Overlay
   ========================================================================== */
.viewport-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 75vw;
    height: 100vh;
    z-index: 1000;
    background: rgba(6, 9, 14, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-left: 1px solid var(--glass-border);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.viewport-overlay.active {
    transform: translateX(0);
}

.viewport-overlay.fullscreen {
    width: 100vw;
}

@media (max-width: 768px) {
    .viewport-overlay {
        width: 100vw;
    }
}

/* Backdrop Dimmer overlay when drawer is open */
.backdrop-dimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.backdrop-dimmer.active {
    opacity: 1;
    pointer-events: auto;
}

/* Viewport Header Controls Bar */
.viewport-header {
    height: 60px;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(13, 17, 23, 0.8);
}

.viewport-service-details {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.viewport-service-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
}

.viewport-service-name {
    font-family: var(--font-header);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.viewport-service-path {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.viewport-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ctrl-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.ctrl-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-border);
}

.ctrl-btn:active {
    transform: scale(0.92);
}

.ctrl-btn svg {
    width: 18px;
    height: 18px;
}

/* Special Action Buttons */
.ctrl-btn-close {
    color: var(--accent-pink);
}
.ctrl-btn-close:hover {
    background: rgba(255, 0, 127, 0.15);
    color: #ff479b;
    border-color: rgba(255, 0, 127, 0.25);
}

.ctrl-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Viewport Frame Container & Iframe */
.viewport-frame-container {
    flex: 1;
    position: relative;
    background: #000;
    width: 100%;
}

.viewport-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--bg-darker);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.viewport-iframe.loaded {
    opacity: 1;
}

/* Glowing Loading Spinner */
.viewport-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.spinner-ring {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 242, 254, 0.1);
    border-top: 3px solid var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.spinner-text {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2.5px;
}

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

.hidden {
    display: none !important;
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.dashboard-footer {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.dashboard-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.dashboard-footer a:hover {
    color: var(--accent-mint);
}
