:root {
    --primary-color: #667eea;
    --secondary-color: #221f1f;
    --dark-bg: #141414;
    --text-light: #ffffff;
    --text-muted: #b3b3b3;
    --primary: #667eea;
    --secondary: #3e76d8;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --warning-color: #ff6b35;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.auth-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    color: var(--text-light);
    overflow-x: hidden;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    opacity: .2;
    color: var(--primary);
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 20%;
    left: 10%;
    font-size: 3rem;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 60%;
    right: 15%;
    font-size: 2.5rem;
    animation-delay: 2s;
}

.floating-icon:nth-child(3) {
    bottom: 30%;
    left: 20%;
    font-size: 2rem;
    animation-delay: 4s;
}

.floating-icon:nth-child(4) {
    top: 40%;
    right: 30%;
    font-size: 1.5rem;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.brand-logo {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 3;
    text-align: center;
}

.brand-logo img {
    width: 200px;
    height: auto;
}

.logo img {
    width: 200px;
    height: auto;
}

.brand-logo h1,
.brand-logo h2 {
    color: var(--primary-color);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.brand-logo h1 { font-size: 2.5rem; }
.brand-logo h2 { font-size: 1.8rem; }

/* Error Page */
.error-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.error-content {
    text-align: center;
    max-width: 700px;
    z-index: 2;
    position: relative;
}

.error-code {
    font-size: 8rem;
    font-weight: bold;
    color: var(--warning-color);
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 50px rgba(255, 107, 53, 0.8);
    }
}

.error-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-light);
}

.error-message {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.error-details {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.error-details h5 {
    color: var(--warning-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-details ul {
    color: var(--text-muted);
    margin: 0;
    padding-left: 20px;
}

.error-details li { margin-bottom: 8px; }

/* Buttons */
.btn-home,
.btn-retry {
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    display: inline-block;
    margin: 10px;
}

.btn-home {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.btn-home:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.btn-retry {
    background: linear-gradient(45deg, var(--warning-color), #ff8c42);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-retry:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--text-muted);
    border-radius: 50px;
    padding: 13px 40px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-muted);
    display: inline-block;
    margin: 10px;
}

.btn-secondary:hover {
    border-color: var(--warning-color);
    color: var(--warning-color);
    transform: translateY(-3px);
}

/* Server Status */
.server-status {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin-top: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-item:last-child { border-bottom: none; }

.status-label { color: var(--text-muted); font-size: 0.9rem; }
.status-value { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.status-online { color: #28a745; }
.status-offline { color: var(--warning-color); }
.status-checking { color: #ffc107; }

/* Retry Countdown */
.retry-countdown {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--warning-color), #ff8c42);
    border-radius: 2px;
    animation: progress 30s linear infinite;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(0, 0, 0, 0.85);
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

.form-floating > .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border-radius: 8px;
}

.form-floating > .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    color: var(--text-light);
}

.form-floating > label { color: var(--text-muted); }

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: white;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider span {
    background: rgba(0, 0, 0, 0.85);
    padding: 0 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-social {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.forgot-password {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover { color: var(--primary-color); }

.signup-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover { text-decoration: underline; }

.input-group-text {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.password-toggle:hover { color: var(--text-light); }

.form-floating.password-field { position: relative; }

/* Responsive */
@media (max-width: 768px) {
    .error-code { font-size: 6rem; }
    .error-title { font-size: 2rem; }
    .error-message { font-size: 1rem; }

    .btn-home, .btn-retry, .btn-secondary {
        padding: 12px 30px;
        font-size: 0.9rem;
        display: block;
        margin: 10px auto;
        max-width: 250px;
    }

    .brand-logo {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 30px;
        display: none;
    }

    .error-details { text-align: center; }

    .status-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }

    .brand-logo h1 { font-size: 2rem; }
    .social-login { flex-direction: column; }
}

