:root {
    --dark-bg: rgba(30, 30, 30, 0.9);
    --button-border: 4px solid white;
    --button-shadow-dark: #666;
    --button-shadow-light: #999;
    --hover-brightness: 1.2;
    --text-color: white;
}

@font-face {
    font-family: 'PowerClearBold';
    src: url('power-clear-bold.ttf') format('truetype');
    font-display: swap;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: url('bg.png') no-repeat center center fixed;
    background-size: cover;
    font-family: 'PowerClearBold', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-x: none;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px 20px 120px 20px;
    gap: 40px;
}

.logo-container {
    max-width: 425px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.logo {
    width: 68%;
    height: auto;
    margin-bottom: 20px;
}

.menu-container {
    max-width: 510px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-option {
    width: 100%;
    padding: 13px 17px;
    margin: 0;
    font-size: 32px;
    font-family: 'PowerClearBold', sans-serif;
    color: var(--text-color);
    text-decoration: none;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    background: var(--dark-bg);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 
        inset -3px -3px 0 var(--button-shadow-dark), 
        inset 3px 3px 0 var(--button-shadow-light);
    position: relative;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.menu-option::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--text-color);
    border-radius: 5px;
    pointer-events: none;
}

.menu-option:hover {
    filter: brightness(var(--hover-brightness));
    transform: scale(1.02);
}

.menu-option.selected {
    filter: brightness(var(--hover-brightness));
    transform: scale(1.02);
    box-shadow: 
        inset -3px -3px 0 var(--button-shadow-light), 
        inset 3px 3px 0 var(--button-shadow-dark);
}

.menu-option:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .page-container {
        padding: 10px 20px 80px 20px;
        gap: 20px;
    }

    .logo-container {
        max-width: 340px;
    }

    .logo {
        width: 68%;
    }

    .menu-container {
        max-width: 510px;
    }

    .menu-option {
        padding: 13px 17px;
        font-size: 24px;
    }
}

@media (max-height: 800px) {
    .page-container {
        gap: 15px;
        padding: 10px 20px 60px 20px;
    }

    .logo-container {
        max-width: 340px;
    }

    .logo {
        width: 68%;
    }

    .menu-container {
        max-width: 510px;
    }

    .menu-option {
        padding: 13px 17px;
        font-size: 24px;
    }
}

/* LED indicator for stream status */
.stream-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #444; /* Off state - dark gray */
    margin-left: 10px;
    vertical-align: middle;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    position: relative;
    top: -2px;
}

.stream-indicator.active {
    background-color: #ff0000; /* On state - red */
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.8);
    animation: pulse-led 2s infinite;
}

@keyframes pulse-led {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Login Button */
.login-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'PowerClearBold', sans-serif;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.login-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: white;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #f0f0f0;
}

.modal-content h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 28px;
    text-align: center;
}

.modal-step {
    margin-top: 20px;
}

.modal-step p {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
}

.modal-step input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'PowerClearBold', sans-serif;
    background: rgba(255, 255, 255, 0.9);
}

.modal-step input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.modal-btn {
    width: 100%;
    padding: 15px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'PowerClearBold', sans-serif;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.modal-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-btn-secondary {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'PowerClearBold', sans-serif;
    transition: all 0.3s ease;
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* User Menu Dropdown */
.user-menu {
    position: fixed;
    top: 70px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1500;
    animation: slideDown 0.2s ease;
}

.user-menu-content {
    padding: 10px;
}

.user-menu-option {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'PowerClearBold', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    text-align: left;
}

.user-menu-option:last-child {
    margin-bottom: 0;
}

.user-menu-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.user-menu-option.logout-option:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-btn {
        top: 10px;
        right: 10px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .user-menu {
        top: 50px;
        right: 10px;
    }

    .modal-content {
        margin: 20% auto;
        padding: 20px;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 24px;
    }

    .modal-step input {
        padding: 12px;
        font-size: 14px;
    }

    .modal-btn {
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .login-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .modal-content {
        margin: 5% auto;
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
        width: 90%;
    }

    .modal-content h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .modal-step {
        margin-top: 15px;
    }
    
    .modal-step p {
        margin-bottom: 10px;
        font-size: 14px;
    }
    
    .modal-step input {
        padding: 10px;
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .modal-btn, .modal-btn-secondary {
        padding: 10px;
        font-size: 14px;
        margin-top: 10px;
    }
}