/* Modern Login Page - Cinema Control Room Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(26, 26, 37, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);

    --accent-primary: #ff6b35;
    --accent-secondary: #ff8f5a;
    --accent-gradient: linear-gradient(135deg, #ff6b35 0%, #ff9f1c 100%);

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7a;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.1);

    --danger: #ef4444;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 159, 28, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 107, 53, 0.05) 0%, transparent 80%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 8s ease-in-out infinite;
}

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

/* Floating orbs */
body::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-30px, 30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, -20px) rotate(180deg);
    }
    75% {
        transform: translate(30px, 20px) rotate(270deg);
    }
}

/* Login Card */
.wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 48px 40px;
    backdrop-filter: blur(20px);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateY(20px);
    opacity: 0;
}

@keyframes cardAppear {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Logo/Brand Section */
.wrapper .top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.wrapper .top h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    position: relative;
}

.wrapper .top h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.wrapper .top h5 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Error & Alert Messages */
.wrapper .error-box {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.wrapper .error-box .error-item {
    color: #fca5a5;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.wrapper .error-box .error-item::before {
    content: '\2717';
    font-weight: bold;
    color: var(--danger);
}

.wrapper .alert-box {
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.wrapper .alert-box.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.wrapper .alert-box.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.wrapper .alert-box.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

.wrapper .alert-box.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Legacy alert-danger without alert-box parent */
.wrapper > .alert-danger:not(.alert-box) {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
    color: #fca5a5;
}

/* Form Styling */
.wrapper form {
    margin-top: 0;
}

.wrapper form .input-box {
    height: auto;
    margin: 0 0 20px 0;
    position: relative;
}

.wrapper form .input-box input {
    width: 100%;
    height: 56px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 0 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.wrapper form .input-box input::placeholder {
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.wrapper form .input-box input:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 107, 53, 0.05);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.wrapper form .input-box input:focus::placeholder {
    opacity: 0.5;
    transform: translateX(5px);
}

/* Input icons (optional enhancement) */
.wrapper form .input-box::before {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s ease;
}

.wrapper form .input-box:focus-within::before {
    color: var(--accent-primary);
}

/* Submit Button */
.wrapper form .input-box.button {
    margin-top: 32px;
}

.wrapper form .input-box.button input {
    height: 56px;
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(255, 107, 53, 0.5);
}

.wrapper form .input-box.button input:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px rgba(255, 107, 53, 0.6);
}

.wrapper form .input-box.button input:active {
    transform: translateY(0);
}

/* Button shine effect */
.wrapper form .input-box.button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
    border-radius: 14px;
}

.wrapper form .input-box.button:hover::after {
    left: 100%;
}

/* Footer */
.below {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    min-height: auto;
    animation: fadeIn 0.8s ease 0.4s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.below .text h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
}

.below .text h3 a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.below .text h3 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.below .text h3 a:hover {
    color: var(--accent-secondary);
}

.below .text h3 a:hover::after {
    width: 100%;
}

/* Responsive */
@media (max-width: 480px) {
    .wrapper {
        margin: 20px;
        padding: 36px 28px;
        max-width: calc(100% - 40px);
    }

    .wrapper .top h2 {
        font-size: 1.75rem;
    }

    .wrapper form .input-box input {
        height: 52px;
        font-size: 0.95rem;
    }

    .wrapper form .input-box.button input {
        height: 52px;
        font-size: 1rem;
    }
}

/* Additional decorative elements */
.wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--accent-gradient);
    border-radius: 26px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wrapper:hover::before {
    opacity: 0.1;
}

/* Grid pattern overlay */
.wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 24px;
    pointer-events: none;
    opacity: 0.5;
}
