/**
 * Background Modes Styles
 * Dark, Light, and Hybrid background modes
 * 
 * @author zAx
 * @version 1.0.0
 */

/* Background layer with smooth transitions */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 0;
    transition: background 0.5s ease, opacity 0.5s ease;
}

/* Dark Mode (default) */
body[data-bg-mode="dark"]::before {
    background: #000000;
}

body[data-bg-mode="dark"] {
    color: #ffffff !important;
}

body[data-bg-mode="dark"] * {
    color: #ffffff;
}

body[data-bg-mode="dark"] .navbar,
body[data-bg-mode="dark"] .main-card,
body[data-bg-mode="dark"] .footer-container {
    color: #ffffff;
}

/* Dark Mode - Glassmorphic components white */
body[data-bg-mode="dark"] .navbar,
body[data-bg-mode="dark"] .main-card,
body[data-bg-mode="dark"] .footer-container,
body[data-bg-mode="dark"] .email-display,
body[data-bg-mode="dark"] .action-buttons button,
body[data-bg-mode="dark"] .domain-selector,
body[data-bg-mode="dark"] .message-card,
body[data-bg-mode="dark"] .stats-grid,
body[data-bg-mode="dark"] .feature-card,
body[data-bg-mode="dark"] .service-card {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
}

/* Dark Mode - Domain Select */
body[data-bg-mode="dark"] select,
body[data-bg-mode="dark"] #domain {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

body[data-bg-mode="dark"] select:focus,
body[data-bg-mode="dark"] #domain:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

body[data-bg-mode="dark"] select option,
body[data-bg-mode="dark"] #domain option {
    background: rgba(0, 0, 0, 0.95) !important;
    color: #ffffff !important;
}

/* Dark Mode - Input fields */
body[data-bg-mode="dark"] input {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

body[data-bg-mode="dark"] input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

body[data-bg-mode="dark"] input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Dark Mode - Buttons */
body[data-bg-mode="dark"] .btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

body[data-bg-mode="dark"] .btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Hybrid Mode (gradient from black to gray to black - static) */
body[data-bg-mode="hybrid"]::before {
    background: linear-gradient(135deg, 
        #000000 0%, 
        #303030 20%,
        #989898 40%,
        #808080 50%,
        #989898 60%,
        #303030 80%,
        #000000 100%
    );
}

body[data-bg-mode="hybrid"] {
    color: #000000 !important;
}

body[data-bg-mode="hybrid"] *:not(select):not(option):not(.modal-header-section):not(.modal-header-section *) {
    color: #000000 !important;
}

body[data-bg-mode="hybrid"] .navbar,
body[data-bg-mode="hybrid"] .main-card,
body[data-bg-mode="hybrid"] .footer-container {
    color: #000000 !important;
}

body[data-bg-mode="hybrid"] h1:not(.modal-header-section *),
body[data-bg-mode="hybrid"] h2:not(.modal-header-section *),
body[data-bg-mode="hybrid"] h3:not(.modal-header-section *),
body[data-bg-mode="hybrid"] h4:not(.modal-header-section *),
body[data-bg-mode="hybrid"] h5:not(.modal-header-section *),
body[data-bg-mode="hybrid"] h6:not(.modal-header-section *),
body[data-bg-mode="hybrid"] p:not(.modal-header-section *),
body[data-bg-mode="hybrid"] span:not(.modal-header-section *),
body[data-bg-mode="hybrid"] li:not(.modal-header-section *),
body[data-bg-mode="hybrid"] a:not(.modal-header-section *),
body[data-bg-mode="hybrid"] div:not(.modal-header-section):not(.modal-header-section *),
body[data-bg-mode="hybrid"] label:not(.modal-header-section *),
body[data-bg-mode="hybrid"] strong:not(.modal-header-section *) {
    color: #000000 !important;
}

body[data-bg-mode="hybrid"] .service-badge,
body[data-bg-mode="hybrid"] .service-icon,
body[data-bg-mode="hybrid"] .price,
body[data-bg-mode="hybrid"] .amount {
    color: #000000 !important;
    text-shadow: none !important;
}

body[data-bg-mode="hybrid"] .nav-links a,
body[data-bg-mode="hybrid"] .auth-btn {
    color: #000000 !important;
}

body[data-bg-mode="hybrid"] button:not(.bg-mode-toggle) {
    color: #000000 !important;
}

/* Remove all text effects in hybrid mode for maximum clarity */
body[data-bg-mode="hybrid"] h1:not(.modal-header-section *),
body[data-bg-mode="hybrid"] h2:not(.modal-header-section *),
body[data-bg-mode="hybrid"] h3:not(.modal-header-section *) {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #000000 !important;
    background-clip: unset !important;
    color: #000000 !important;
}

/* Ensure all checkmarks and icons are black */
body[data-bg-mode="hybrid"] .features-list li:before {
    color: #000000 !important;
}

/* Code boxes and special text */
body[data-bg-mode="hybrid"] .code-box,
body[data-bg-mode="hybrid"] #generated-email {
    color: #000000 !important;
}

/* Hybrid Mode - Input placeholder */
body[data-bg-mode="hybrid"] input::placeholder {
    color: #000000 !important;
    opacity: 0.7;
}

/* Hybrid Mode - Input fields */
body[data-bg-mode="hybrid"] input {
    color: #000000 !important;
}

body[data-bg-mode="hybrid"] input:focus {
    box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.3) !important;
}

/* Keep highlight/warning box headings sky blue in hybrid mode */
body[data-bg-mode="hybrid"] .highlight strong,
body[data-bg-mode="hybrid"] .warning-box strong,
body[data-bg-mode="hybrid"] .highlight-box h3,
body[data-bg-mode="hybrid"] .highlight-box strong {
    color: #00d4ff !important;
}

/* Hybrid Mode - Domain Select with gradient */
body[data-bg-mode="hybrid"] select,
body[data-bg-mode="hybrid"] #domain {
    background: linear-gradient(135deg, 
        #909090 0%, 
        #a0a0a0 20%,
        #b0b0b0 40%,
        #c0c0c0 50%,
        #b0b0b0 60%,
        #a0a0a0 80%,
        #909090 100%
    ) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
    color: #000000 !important;
    text-shadow: none;
}

body[data-bg-mode="hybrid"] select:focus,
body[data-bg-mode="hybrid"] #domain:focus {
    border-color: rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.3) !important;
}

body[data-bg-mode="hybrid"] select option,
body[data-bg-mode="hybrid"] #domain option {
    background: linear-gradient(135deg, 
        #909090 0%, 
        #a0a0a0 20%,
        #b0b0b0 40%,
        #c0c0c0 50%,
        #b0b0b0 60%,
        #a0a0a0 80%,
        #909090 100%
    ) !important;
    color: #000000 !important;
}

/* Background Mode Toggle Button - Animated */
/* New Modern Toggle Button Design */
@keyframes slideShine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.bg-mode-toggle {
    position: relative;
    width: 55px;
    height: 28px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.bg-mode-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.15), 
        transparent
    );
    animation: slideShine 3s ease-in-out infinite;
}

.bg-mode-toggle .mode-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    border-radius: 50%;
    top: 2px;
    left: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Hybrid mode - move knob to right and change colors */
body[data-bg-mode="hybrid"] .bg-mode-toggle {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

body[data-bg-mode="hybrid"] .bg-mode-toggle .mode-icon {
    left: 28px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.bg-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 6px 16px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.bg-mode-toggle:active {
    transform: scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bg-mode-toggle {
        width: 48px;
        height: 24px;
    }
    
    .bg-mode-toggle .mode-icon {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    
    body[data-bg-mode="hybrid"] .bg-mode-toggle .mode-icon {
        left: 24px;
    }
}
