/* ToolishIdle - Retro Screensavers Styles */

/* Screensaver Container */
.screensaver-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.screensaver-container canvas {
    display: block;
    cursor: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    outline: none;
    background: #000;
}

/* Fullscreen canvas styling */
canvas:fullscreen {
    background: #000 !important;
    opacity: 1 !important;
}

canvas:-webkit-full-screen {
    background: #000 !important;
    opacity: 1 !important;
}

canvas:-moz-full-screen {
    background: #000 !important;
    opacity: 1 !important;
}

canvas:-ms-fullscreen {
    background: #000 !important;
    opacity: 1 !important;
}

/* Retro Mode Styles */
.retro-mode {
    background: #000 !important;
    color: #0f0 !important;
    font-family: 'Courier New', monospace !important;
}

.retro-mode .screensaver-container {
    background: #000;
    border: 2px solid #0f0;
}

.retro-mode .card {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid #0f0 !important;
    color: #0f0 !important;
}

.retro-mode .btn {
    background: #000 !important;
    color: #0f0 !important;
    border: 1px solid #0f0 !important;
    font-family: 'Courier New', monospace !important;
}

.retro-mode .btn:hover {
    background: #0f0 !important;
    color: #000 !important;
}

.retro-mode .btn.active {
    background: #0f0 !important;
    color: #000 !important;
}

/* Control Panel Enhancements */
.card-title {
    color: var(--text-primary);
    font-weight: 600;
}

.btn[data-mode] {
    transition: all 0.3s ease;
    text-align: left;
    justify-content: flex-start;
}

.btn[data-mode]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn[data-mode].active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

/* Fullscreen Button */
#fullscreenBtn {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: white !important;
}

#fullscreenBtn:hover {
    background: var(--success) !important;
    border-color: var(--success) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Canvas Responsive Sizing */
@media (max-width: 768px) {
    .screensaver-container {
        min-height: 300px;
    }
    
    .col-lg-3 {
        margin-bottom: 1rem;
    }
}


/* Animation Enhancements */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Custom Scrollbar for Retro Mode */
.retro-mode ::-webkit-scrollbar {
    width: 8px;
}

.retro-mode ::-webkit-scrollbar-track {
    background: #000;
}

.retro-mode ::-webkit-scrollbar-thumb {
    background: #0f0;
    border-radius: 4px;
}

.retro-mode ::-webkit-scrollbar-thumb:hover {
    background: #0a0;
}

/* Focus States */
.btn:focus {
    box-shadow: 0 0 0 0.2rem var(--primary-20);
}

/* Speed Control Styling */
#pipesSpeedControl,
#starfieldSpeedControl,
#matrixSpeedControl,
#bouncingSpeedControl,
#driveSpeedControl {
    transition: all 0.3s ease;
}

#pipesSpeedControl .form-label,
#starfieldSpeedControl .form-label,
#matrixSpeedControl .form-label,
#bouncingSpeedControl .form-label,
#driveSpeedControl .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

#pipesSpeedControl .form-range,
#starfieldSpeedControl .form-range,
#matrixSpeedControl .form-range,
#bouncingSpeedControl .form-range,
#driveSpeedControl .form-range {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    transition: all 0.3s ease;
}

#pipesSpeedControl .form-range::-webkit-slider-thumb,
#starfieldSpeedControl .form-range::-webkit-slider-thumb,
#matrixSpeedControl .form-range::-webkit-slider-thumb,
#bouncingSpeedControl .form-range::-webkit-slider-thumb,
#driveSpeedControl .form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

#pipesSpeedControl .form-range::-webkit-slider-thumb:hover,
#starfieldSpeedControl .form-range::-webkit-slider-thumb:hover,
#matrixSpeedControl .form-range::-webkit-slider-thumb:hover,
#bouncingSpeedControl .form-range::-webkit-slider-thumb:hover,
#driveSpeedControl .form-range::-webkit-slider-thumb:hover {
    background: var(--primary-80);
    transform: scale(1.1);
}

#pipesSpeedControl .form-range::-moz-range-thumb,
#starfieldSpeedControl .form-range::-moz-range-thumb,
#matrixSpeedControl .form-range::-moz-range-thumb,
#bouncingSpeedControl .form-range::-moz-range-thumb,
#driveSpeedControl .form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

#pipesSpeedControl .form-range::-moz-range-thumb:hover,
#starfieldSpeedControl .form-range::-moz-range-thumb:hover,
#matrixSpeedControl .form-range::-moz-range-thumb:hover,
#bouncingSpeedControl .form-range::-moz-range-thumb:hover,
#driveSpeedControl .form-range::-moz-range-thumb:hover {
    background: var(--primary-80);
    transform: scale(1.1);
}

/* Retro mode speed control */
.retro-mode #pipesSpeedControl .form-label,
.retro-mode #starfieldSpeedControl .form-label,
.retro-mode #matrixSpeedControl .form-label,
.retro-mode #bouncingSpeedControl .form-label,
.retro-mode #driveSpeedControl .form-label {
    color: #0f0 !important;
}

.retro-mode #pipesSpeedControl .form-range,
.retro-mode #starfieldSpeedControl .form-range,
.retro-mode #matrixSpeedControl .form-range,
.retro-mode #bouncingSpeedControl .form-range,
.retro-mode #driveSpeedControl .form-range {
    background: #000 !important;
    border: 1px solid #0f0 !important;
}

.retro-mode #pipesSpeedControl .form-range::-webkit-slider-thumb,
.retro-mode #starfieldSpeedControl .form-range::-webkit-slider-thumb,
.retro-mode #matrixSpeedControl .form-range::-webkit-slider-thumb,
.retro-mode #bouncingSpeedControl .form-range::-webkit-slider-thumb,
.retro-mode #driveSpeedControl .form-range::-webkit-slider-thumb {
    background: #0f0 !important;
}

.retro-mode #pipesSpeedControl .form-range::-webkit-slider-thumb:hover,
.retro-mode #starfieldSpeedControl .form-range::-webkit-slider-thumb:hover,
.retro-mode #matrixSpeedControl .form-range::-webkit-slider-thumb:hover,
.retro-mode #bouncingSpeedControl .form-range::-webkit-slider-thumb:hover,
.retro-mode #driveSpeedControl .form-range::-webkit-slider-thumb:hover {
    background: #0a0 !important;
}

.retro-mode #pipesSpeedControl .form-range::-moz-range-thumb,
.retro-mode #starfieldSpeedControl .form-range::-moz-range-thumb,
.retro-mode #matrixSpeedControl .form-range::-moz-range-thumb,
.retro-mode #bouncingSpeedControl .form-range::-moz-range-thumb,
.retro-mode #driveSpeedControl .form-range::-moz-range-thumb {
    background: #0f0 !important;
}

.retro-mode #pipesSpeedControl .form-range::-moz-range-thumb:hover,
.retro-mode #starfieldSpeedControl .form-range::-moz-range-thumb:hover,
.retro-mode #matrixSpeedControl .form-range::-moz-range-thumb:hover,
.retro-mode #bouncingSpeedControl .form-range::-moz-range-thumb:hover,
.retro-mode #driveSpeedControl .form-range::-moz-range-thumb:hover {
    background: #0a0 !important;
}

/* Print Styles */
@media print {
    .screensaver-container {
        display: none;
    }
    
    .btn {
        display: none !important;
    }
    
    #pipesSpeedControl,
    #starfieldSpeedControl,
    #matrixSpeedControl,
    #bouncingSpeedControl,
    #driveSpeedControl {
        display: none !important;
    }
}
