/* FlipUp Web Application Styles - Hacker Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    background: #000000;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(0, 255, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 0, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, #000000 0%, #001100 50%, #000000 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00ff00;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
}



.container {
    width: 100%;
    max-width: 98vw;
    height: 95vh;
    padding: 20px 10px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.main-box {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    padding: 20px;
    border-radius: 0;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    text-align: left;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}



h1 {
    color: #00ff00;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff00;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
    to { text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00; }
}

/* Removed unused form and button styles to improve performance */

/* Dashboard Grid Layout */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    align-items: flex-start;
    flex: 1;
}

/* Function Container Styles */
.function-container {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ff00;
    border-radius: 0;
    padding: 0;
    box-shadow: 
        0 0 15px rgba(0, 255, 0, 0.2),
        inset 0 0 10px rgba(0, 255, 0, 0.05);
    position: relative;
    overflow: hidden;
    width: fit-content;
    max-width: 100%;
}

.container-header {
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
}



.container-header h3 {
    color: #00ff00;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 
        0 0 10px #00ff00,
        0 0 20px #00ff00,
        0 0 30px #00ff00;
    font-size: 20px;
    position: relative;
    z-index: 1;
    animation: headerGlow 2s ease-in-out infinite alternate;
}

@keyframes headerGlow {
    from { 
        text-shadow: 
            0 0 10px #00ff00,
            0 0 20px #00ff00,
            0 0 30px #00ff00;
    }
    to { 
        text-shadow: 
            0 0 15px #00ff00,
            0 0 30px #00ff00,
            0 0 45px #00ff00;
    }
}

.container-content {
    padding: 8px;
}

/* AORUS Switch Container Specific */
.aorus-switch-container {
    min-height: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    margin: 20px 0 0 20px;
    align-self: flex-start;
}

/* ESP32 Status Indicator Inside Container */
.esp32-status-indicator {
    margin-top: 0;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 0;
    min-width: 160px;
    flex-shrink: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #00ff00;
    box-shadow: 0 0 8px #00ff00;
}

.status-dot.offline {
    background: #ff0000;
    box-shadow: 0 0 8px #ff0000;
}

.status-dot.error {
    background: #ffaa00;
    box-shadow: 0 0 8px #ffaa00;
}

.status-text {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 10px;
}

.status-text.online {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.status-text.offline {
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

.status-text.error {
    color: #ffaa00;
    text-shadow: 0 0 5px #ffaa00;
}

.status-details {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    color: #00ff00;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.5);
}

.response-time, .last-check {
    color: #00ff00;
}

/* Exciting Power Button Styles */
.switch-container {
    display: flex;
    justify-content: center;
    margin: 6px 0;
    flex-wrap: wrap;
}

.switch-wrapper {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.switch-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.status-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.switch-input {
    display: none;
}

.switch-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.power-button {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #333 0%, #111 100%);
    border: 3px solid #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 15px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.power-button.off {
    border-color: #666;
    background: radial-gradient(circle, #333 0%, #111 100%);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.power-button.on {
    border-color: #00ff00;
    background: radial-gradient(circle, #003300 0%, #001100 100%);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 255, 0, 0.2),
        0 0 30px rgba(0, 255, 0, 0.3);
    animation: buttonPulse 2s ease-in-out infinite alternate;
}

@keyframes buttonPulse {
    from { 
        box-shadow: 
            0 8px 20px rgba(0, 0, 0, 0.5),
            inset 0 2px 4px rgba(0, 255, 0, 0.2),
            0 0 30px rgba(0, 255, 0, 0.3);
    }
    to { 
        box-shadow: 
            0 8px 20px rgba(0, 0, 0, 0.5),
            inset 0 2px 4px rgba(0, 255, 0, 0.4),
            0 0 50px rgba(0, 255, 0, 0.6);
    }
}

.button-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.4s ease;
}

.button-ring.off {
    border-color: #666;
    box-shadow: none;
}

.button-ring.on {
    border-color: #00ff00;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.5),
        0 0 40px rgba(0, 255, 0, 0.3);
    animation: ringPulse 1.5s ease-in-out infinite alternate;
}

@keyframes ringPulse {
    from { 
        box-shadow: 
            0 0 20px rgba(0, 255, 0, 0.5),
            0 0 40px rgba(0, 255, 0, 0.3);
    }
    to { 
        box-shadow: 
            0 0 30px rgba(0, 255, 0, 0.8),
            0 0 60px rgba(0, 255, 0, 0.5);
    }
}

.button-center {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, #444 0%, #222 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    border: 2px solid #555;
}

.button-center.off {
    background: radial-gradient(circle, #444 0%, #222 100%);
    border-color: #555;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.button-center.on {
    background: radial-gradient(circle, #00aa00 0%, #006600 100%);
    border-color: #00ff00;
    box-shadow: 
        inset 0 2px 4px rgba(0, 255, 0, 0.3),
        0 0 20px rgba(0, 255, 0, 0.4);
    animation: centerGlow 1.8s ease-in-out infinite alternate;
}

@keyframes centerGlow {
    from { 
        box-shadow: 
            inset 0 2px 4px rgba(0, 255, 0, 0.3),
            0 0 20px rgba(0, 255, 0, 0.4);
    }
    to { 
        box-shadow: 
            inset 0 2px 4px rgba(0, 255, 0, 0.5),
            0 0 30px rgba(0, 255, 0, 0.6);
    }
}

.power-symbol {
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px currentColor;
}

.power-symbol.off {
    color: #666;
    text-shadow: none;
}

.power-symbol.on {
    color: #00ff00;
    text-shadow: 0 0 15px #00ff00;
    animation: symbolPulse 1.2s ease-in-out infinite alternate;
}

@keyframes symbolPulse {
    from { 
        text-shadow: 0 0 15px #00ff00;
        transform: scale(1);
    }
    to { 
        text-shadow: 0 0 25px #00ff00, 0 0 35px #00ff00;
        transform: scale(1.1);
    }
}

.status-indicator-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.status-indicator-dot.off {
    background: #666;
    box-shadow: none;
}

.status-indicator-dot.on {
    background: #00ff00;
    box-shadow: 
        0 0 10px #00ff00,
        0 0 20px rgba(0, 255, 0, 0.5);
    animation: dotPulse 1s ease-in-out infinite alternate;
}

@keyframes dotPulse {
    from { 
        box-shadow: 
            0 0 10px #00ff00,
            0 0 20px rgba(0, 255, 0, 0.5);
    }
    to { 
        box-shadow: 
            0 0 15px #00ff00,
            0 0 30px rgba(0, 255, 0, 0.8);
    }
}

.button-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 0%, transparent 70%, rgba(0, 255, 0, 0.1) 100%);
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}

.button-glow.off {
    opacity: 0;
}

.button-glow.on {
    opacity: 1;
    animation: glowRotate 3s linear infinite;
}

@keyframes glowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.switch-input:disabled + .switch-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.switch-text {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px #00ff00;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 2px;
    min-width: 120px;
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
}

.switch-label:hover .power-button {
    transform: scale(1.05);
}

.switch-label:hover .power-button.off {
    box-shadow: 
        0 12px 25px rgba(0, 0, 0, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 0.15);
}

.switch-label:hover .power-button.on {
    box-shadow: 
        0 12px 25px rgba(0, 0, 0, 0.6),
        inset 0 2px 4px rgba(0, 255, 0, 0.3),
        0 0 40px rgba(0, 255, 0, 0.5);
}

.switch-label:hover .switch-text {
    text-shadow: 0 0 15px #00ff00;
    transform: translateY(-2px);
}

/* Uptime Display Styles */
.uptime-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2px;
    gap: 1px;
}

.uptime-label {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px #00ff00;
    opacity: 0.8;
}

.uptime-value {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0 0 8px #00ff00;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 60px;
    text-align: center;
    transition: all 0.3s ease;
}

.uptime-value:hover {
    background: rgba(0, 255, 0, 0.2);
    border-color: rgba(0, 255, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* Removed unused error and control section styles */


/* Version Footer Styles */
.version-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid #00ff00;
    padding: 8px 20px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 255, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-left p {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    margin: 0;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    letter-spacing: 1px;
    align-items: center;
}

.footer-right {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.btn-disconnect {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
    border: 1px solid #ff0000;
    padding: 4px 12px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    font-size: 10px;
    transition: all 0.3s ease;
    display: inline-block;
    border-radius: 0;
}

.btn-disconnect:hover {
    background: rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    text-shadow: 0 0 5px #ff0000;
    transform: translateY(-1px);
}

/* Add bottom padding to main content to account for fixed footer */
body {
    padding-bottom: 40px;
}



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

/* Login Box Styles */
.login-box {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    position: relative;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.login-box h1 {
    color: #00ff00;
    font-size: 28px;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #00ff00;
    font-weight: bold;
    letter-spacing: 2px;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #00ff00;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: bold;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 5px;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    background: rgba(0, 20, 0, 0.8);
}

.btn-primary {
    background: linear-gradient(45deg, #00ff00, #00cc00);
    color: #000000;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #00cc00, #00ff00);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    transform: translateY(-2px);
}

.error-message {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0000;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

.version-footer {
    position: fixed;
    color: #00ff00;
    font-size: 13px;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 15px;
    border-top: 1px solid #00ff00;
}

/* Footer styling for both login and main screens */
.version-footer p {
    text-align: center;
    margin: 0;
}

.version-footer .footer-left {
    display: flex;
    align-items: center;
    text-align: left;
    flex: 0 0 auto;
    min-width: 80px;
    justify-content: flex-start;
}

.version-footer .footer-center {
    display: flex;
    align-items: center;
    text-align: center;
    flex: 1;
    justify-content: center;
}

.version-footer .footer-right {
    display: flex;
    align-items: center;
    text-align: right;
    flex: 0 0 auto;
    min-width: 80px;
    justify-content: flex-end;
}

/* Time display in footer */
.version-footer .current-time-display {
    display: flex;
    align-items: center;
}

.version-footer .time-value {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.version-footer .btn-disconnect {
    color: #ff0000;
    text-decoration: none;
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #ff0000;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.version-footer .btn-disconnect:hover {
    background: rgba(255, 0, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .switch-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    .status-section {
        gap: 6px;
    }
    
    .esp32-status-indicator {
        min-width: auto;
        width: 100%;
        padding: 4px 6px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .login-box, .main-box, .error-box, .success-box {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .switch-wrapper {
        flex-direction: column;
        gap: 6px;
    }
    
    .status-section {
        gap: 4px;
    }
    
    .esp32-status-indicator {
        min-width: auto;
        width: 100%;
        padding: 4px 6px;
    }
    
    .version-footer {
        padding: 6px 15px;
    }
    
    .footer-right {
        right: 15px;
    }
    
    .footer-left p {
        font-size: 10px;
    }
    
    .btn-disconnect {
        padding: 3px 8px;
        font-size: 9px;
    }
    
    .dashboard-grid {
        gap: 10px;
        margin: 10px 0;
    }
    
    .function-container {
        width: 100%;
        max-width: 100%;
    }
    
    .container-header {
        padding: 10px 15px;
    }
    
    .container-header h3 {
        font-size: 14px;
    }
    
    .container-content {
        padding: 15px;
    }
}
