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

:root {
    --primary-bg: #000000;
    --primary-text: #ffffff;
    --accent-red: #ff3333;
    --accent-orange: #ff6b35;
    --accent-yellow: #ffaa33;
    --border-color: #333333;
    --success-color: #00ff00;
    --error-color: #ff0000;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-bg);
    color: var(--primary-text);
}

/* Landing Page */
.landing-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #000000 100%);
}

.logo {
    max-width: 300px;
    width: 80%;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    animation: fadeIn 1s ease-in;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px var(--accent-orange));
}

.logo:active {
    transform: scale(0.98);
}

.tagline {
    margin-top: 30px;
    color: var(--accent-orange);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
}

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #111111;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
    animation: slideUp 0.3s ease;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: var(--primary-text);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--accent-red);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--accent-orange);
    font-size: 24px;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-form.hidden {
    display: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-text);
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--primary-text);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-orange);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888888;
    font-size: 12px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: var(--primary-bg);
}

.btn-primary:hover {
    background-color: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.form-switch {
    text-align: center;
    margin-top: 20px;
    color: #888888;
    font-size: 14px;
}

.form-switch a {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* Error and Loading States */
.error-message {
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.error-message.hidden {
    display: none;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
        max-width: 95%;
    }

    .logo {
        max-width: 250px;
    }

    .auth-container h2 {
        font-size: 20px;
    }

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

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    body {
        height: -webkit-fill-available;
    }
}
