/* Custom Premium Stylesheet for HomeTwin OS Ultimate Command Center */

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.4);
}

/* Animations */
@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 12s linear infinite;
}

/* Tab Transitions */
.tab-panel {
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(0);
    opacity: 1;
}

.tab-panel.hidden {
    display: none;
    transform: translateY(12px);
    opacity: 0;
}

/* Sidebar Nav Button Styles */
.nav-btn {
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn.active-nav {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
    color: #f8fafc;
    box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.08);
}

.nav-btn.active-nav svg {
    color: #3b82f6;
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.5));
}

/* Camera scanline simulation */
.scanlines {
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    z-index: 10;
}

/* CRT monitor flickering overlay effect */
@keyframes flicker {
    0% { opacity: 0.98; }
    50% { opacity: 1; }
    100% { opacity: 0.99; }
}

.scanlines::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 11;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

/* Custom dimmer slider customization for Webkit */
input[type=range]::-webkit-slider-runnable-track {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 9999px;
    height: 6px;
}

input[type=range]::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    background: #06b6d4;
    border-radius: 50px;
    appearance: none;
    margin-top: -5px;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
    transition: transform 0.2s, background-color 0.2s;
}

input[type=range]:disabled::-webkit-slider-thumb {
    background: #475569;
    box-shadow: none;
    cursor: not-allowed;
}

input[type=range]:disabled::-webkit-slider-runnable-track {
    background: rgba(15, 23, 42, 0.4);
    cursor: not-allowed;
}

input[type=range]::-webkit-slider-thumb:hover:not(:disabled) {
    transform: scale(1.2);
    background: #22d3ee;
}

/* Glassmorphic cards hover glow and drop shadow overrides */
.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-2px);
}

/* Custom neon glowing button gradients */
.glow-button {
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.glow-button:hover:not(:disabled) {
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.45);
    transform: translateY(-1px);
}

/* Solar power radial offsets */
.solar-meter-bg {
    background: radial-gradient(circle at center, rgba(234, 179, 8, 0.08) 0%, transparent 70%);
}

/* Micro pulse for alert badges */
.pulsing-alert-ring {
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
    animation: pulse-ring 1.8s cubic-bezier(0.66, 0, 0, 1) infinite;
}

@keyframes pulse-ring {
    to { box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
}

/* Smooth fade-in overlay */
.overlay-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal-scale-up {
    transform: scale(1) !important;
}
