/* ===================================================================
   EXULO - EPIC PORTAL LOGIN
   Cinematic space portal theme with neon-cyan accents
   =================================================================== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    position: relative;
    overflow: hidden; /* Prevent scrolling */
}

/* ========================================
   PORTAL BACKGROUND IMAGE
   ======================================== */

.portal-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/Portal2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: opacity 0.3s ease; /* Schnellerer Übergang */
}

/* ========================================
   PORTAL VIDEO (For transition)
   ======================================== */

.portal-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    background: #000; /* Schwarzer Hintergrund falls Video noch lädt */
    transition: opacity 0.5s ease; /* Schnellerer Übergang */
}

/* ========================================
   LOGIN CONTAINER
   ======================================== */

.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.portal-frame {
    background: rgba(0, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    border: 2px solid #00f3ff;
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 450px;
    box-shadow:
        0 0 40px rgba(0, 243, 255, 0.3),
        inset 0 0 60px rgba(0, 243, 255, 0.05);
    animation: portalGlow 3s ease-in-out infinite;
}

@keyframes portalGlow {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(0, 243, 255, 0.3),
            inset 0 0 60px rgba(0, 243, 255, 0.05);
    }
    50% {
        box-shadow:
            0 0 60px rgba(0, 243, 255, 0.5),
            inset 0 0 80px rgba(0, 243, 255, 0.08);
    }
}

/* ========================================
   TABS
   ======================================== */

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    color: #00f3ff;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab.active {
    border-bottom-color: #00f3ff;
    text-shadow: 0 0 10px #00f3ff;
}

.tab:not(.active):hover {
    color: #66f6ff;
    border-bottom-color: rgba(0, 243, 255, 0.3);
}

/* ========================================
   PORTAL TITLE
   ======================================== */

.portal-title {
    text-align: center;
    font-size: 2.2em;
    color: #00f3ff;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow:
        0 0 10px #00f3ff,
        0 0 20px #00f3ff,
        0 0 30px #00f3ff;
    transition: text-shadow 1s ease;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

.input-group {
    margin-bottom: 25px;
    transition: box-shadow 0.3s ease;
}

.input-group label {
    display: block;
    color: #00f3ff;
    font-size: 0.9em;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 20, 40, 0.6);
    border: 1px solid #00f3ff;
    border-radius: 8px;
    color: #e0f7ff;
    font-size: 1em;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input::placeholder {
    color: rgba(0, 243, 255, 0.4);
}

.input-group input:focus {
    border-color: #00f3ff;
    background: rgba(0, 30, 60, 0.8);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

/* ========================================
   PORTAL BUTTON
   ======================================== */

.portal-button {
    position: relative;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #00d4ff 0%, #0088ff 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 20px rgba(0, 212, 255, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.portal-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 30px rgba(0, 212, 255, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

.portal-button:active {
    transform: translateY(0);
}

.button-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: buttonShine 3s ease-in-out infinite;
}

@keyframes buttonShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* ========================================
   ERROR MESSAGE
   ======================================== */

.error-message {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid #f44336;
    border-radius: 8px;
    padding: 12px 16px;
    color: #ff5252;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.success-message {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid #00ff88;
    border-radius: 8px;
    padding: 12px 16px;
    color: #00ff88;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    animation: successGlow 0.5s ease;
}

@keyframes successGlow {
    0% { box-shadow: 0 0 0 rgba(0, 255, 136, 0); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.5); }
    100% { box-shadow: 0 0 10px rgba(0, 255, 136, 0.2); }
}

.error-icon, .success-icon {
    font-size: 1.2em;
}

/* Input error state */
input.input-error {
    border-color: #ff5252 !important;
    box-shadow: 0 0 0 2px rgba(255, 82, 82, 0.2) !important;
    animation: inputShake 0.3s ease;
}

input.input-error:focus {
    border-color: #ff5252 !important;
    box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.3) !important;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   LOGIN OPTIONS (Below button)
   ======================================== */

.login-options {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.login-option-link {
    color: #00f3ff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.login-option-link:hover {
    color: #66f6ff;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.option-separator {
    color: rgba(0, 243, 255, 0.3);
    font-size: 1.2em;
}

/* ========================================
   FOOTER ON LOGIN PAGE
   ======================================== */

body .exulo-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    z-index: 1000 !important; /* Above everything */
    background: rgba(13, 13, 13, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* ========================================
   DEMO ACCESS BUTTONS (Bottom Left)
   ======================================== */

.demo-access {
    position: fixed;
    bottom: 40px; /* Above footer */
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 243, 255, 0.4);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.demo-title {
    font-size: 0.7em;
    color: rgba(0, 243, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-align: center;
    font-weight: 600;
}

.demo-btn {
    padding: 8px 16px;
    background: rgba(0, 150, 255, 0.15);
    border: 1px solid #00f3ff;
    border-radius: 4px;
    color: #00f3ff;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.demo-btn:hover {
    background: rgba(0, 150, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
    transform: translateY(-2px);
}

.demo-btn.demo-1 {
    border-color: #00ff88;
    color: #00ff88;
}

.demo-btn.demo-2 {
    border-color: #ffaa00;
    color: #ffaa00;
}

.demo-btn.demo-3 {
    border-color: #ff0099;
    color: #ff0099;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .portal-frame {
        padding: 30px 20px;
        width: 95%;
    }

    .portal-title {
        font-size: 1.8em;
    }

    .input-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .login-options {
        flex-direction: column;
        gap: 8px;
    }

    .demo-access {
        bottom: 50px; /* More space above footer on mobile */
        left: 10px;
        padding: 8px;
        gap: 6px;
    }

    .demo-title {
        font-size: 0.65em;
    }

    .demo-btn {
        padding: 6px 12px;
        font-size: 0.75em;
    }
}

/* ========================================
   LOADING ANIMATION
   ======================================== */

@keyframes portalPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ========================================
   SKIP ANIMATION OPTION
   ======================================== */

.skip-animation-option {
    margin: 15px 0 10px 0;
    text-align: center;
}

.skip-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.skip-checkbox-label:hover {
    transform: translateX(2px);
}

.skip-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #00f3ff;
}

.skip-text {
    color: rgba(0, 243, 255, 0.8);
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.skip-checkbox-label:hover .skip-text {
    color: #00f3ff;
}

/* ========================================
   ONLINE PLAYER COUNTER
   ======================================== */

.online-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(0, 243, 255, 0.8);
    font-size: 0.85em;
}

.online-indicator {
    font-size: 0.7em;
    animation: onlinePulse 2s ease-in-out infinite;
}

.online-count {
    font-weight: 500;
}

@keyframes onlinePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}
