/* Login Page Styles - Kinguin Theme (Orange, White, Black) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    
    /* Dark background */
    background: #0a0a0a;
}

/* Animated Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}


.login-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    position: relative;
    background: transparent;
    border-radius: 28px;
    padding: 48px 40px;
    border: none;
    overflow: hidden;
}

/* Glass inner glow layer */
.login-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    box-shadow: 
        inset 2px 2px 0px -1px rgba(255, 255, 255, 0.4),
        inset 0 0 4px 1px rgba(255, 255, 255, 0.2),
        inset -1px -1px 0px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* Glass blur background layer */
.login-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
}

/* Ensure content is above glass layers */
.login-card > * {
    position: relative;
    z-index: 2;
}

.logo-area {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #F37B20 0%, #ff9e5e 100%);
    border-radius: 24px;
    margin-bottom: 28px;
    box-shadow: 
        0 16px 48px rgba(243, 123, 32, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 16px 48px rgba(243, 123, 32, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 20px 60px rgba(243, 123, 32, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

.logo-icon {
    font-size: 44px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.logo-area h1 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.login-form {
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #F37B20;
    box-shadow: 
        0 0 0 3px rgba(243, 123, 32, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.login-btn {
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    background: linear-gradient(135deg, #F37B20 0%, #ff9e5e 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 
        0 8px 24px rgba(243, 123, 32, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover:not(:disabled)::before {
    left: 100%;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 32px rgba(243, 123, 32, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-text {
    font-weight: 700;
}

.okta-container {
    margin-bottom: 24px;
}

.okta-btn {
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.okta-btn:hover {
    border-color: #F37B20;
    background: rgba(243, 123, 32, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.okta-icon {
    width: 24px;
    height: 24px;
    color: #F37B20;
}

.okta-info {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 14px;
}

.login-footer {
    text-align: center;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-footer p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

.login-footer a {
    color: #F37B20;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-footer a:hover {
    color: #ff9e5e;
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Error Message */
.error-message {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.error-icon {
    font-size: 18px;
}

.error-text {
    color: #ff6b7a;
    font-size: 14px;
    font-weight: 500;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    gap: 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Test Login Button Variation */
.test-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: none;
}

.test-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.test-btn::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 28px;
        border-radius: 20px;
    }

    .logo-area h1 {
        font-size: 26px;
    }

    .logo-icon-wrapper {
        width: 72px;
        height: 72px;
        border-radius: 20px;
    }

    .logo-icon {
        font-size: 36px;
    }
}

/* Loading state animation */
.login-btn.loading .btn-text,
.login-btn.loading .btn-icon {
    opacity: 0;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Extra: Kinguin-style accent line */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #F37B20, #ff9e5e);
    border-radius: 0 0 4px 4px;
}

.login-card {
    position: relative;
}
