/* === Login Page Styles === */

.login-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0a0a1a;
    background-image: url('../assets/login/bg/login.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 99999;
    overflow-y: auto;
}

/* Overlay for background image readability */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.45);
    pointer-events: none;
    z-index: 0;
}

/* Starfield canvas */
.login-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Floating aurora blobs */
.login-aurora {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}

.login-aurora-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #764ba2, transparent 70%);
    top: -10%;
    left: -10%;
    animation: auroraFloat1 12s ease-in-out infinite;
}

.login-aurora-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #f093fb, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation: auroraFloat2 14s ease-in-out infinite;
}

.login-aurora-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #667eea, transparent 70%);
    top: 40%;
    right: 20%;
    animation: auroraFloat3 10s ease-in-out infinite;
}

.login-aurora-4 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #FF69B4, transparent 70%);
    bottom: 20%;
    left: 15%;
    animation: auroraFloat4 16s ease-in-out infinite;
}

@keyframes auroraFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 50px) scale(1.1); }
    66% { transform: translate(-30px, 80px) scale(0.95); }
}

@keyframes auroraFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -40px) scale(1.05); }
    66% { transform: translate(40px, -70px) scale(0.9); }
}

@keyframes auroraFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, 60px) scale(1.15); }
}

@keyframes auroraFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, -50px) scale(1.1); }
}

.login-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 40px 36px;
    width: 400px;
    max-width: 92vw;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: loginCardIn 0.6s ease-out;
    box-sizing: border-box;
    margin: 20px 0;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 8px;
    font-size: 48px;
}

.login-logo img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(255, 105, 180, 0.4));
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.login-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0 0 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.login-subtitle {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 28px;
}

.login-form-group {
    margin-bottom: 18px;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
}

.login-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s;
    outline: none;
    font-family: inherit;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-input:focus {
    border-color: rgba(255, 105, 180, 0.7);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.12);
}

/* Input icon bounce on focus */
.login-input-icon:focus-within .login-icon {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.login-input-icon .login-icon {
    transition: all 0.3s ease;
}

.login-input-icon {
    position: relative;
}

.login-input-icon .login-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.7;
}

.login-input-icon .login-input {
    padding-left: 42px;
}

/* Password visibility toggle */
.login-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
}

.login-pw-toggle:hover {
    color: rgba(255, 255, 255, 0.85);
}

.login-input-icon:has(.login-pw-toggle) .login-input {
    padding-right: 42px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #FF69B4;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #FF69B4, #FF1493);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.35);
    font-family: inherit;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 20, 147, 0.5);
}

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

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.login-switch a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.login-switch a:hover {
    color: #FFF;
    text-decoration: underline;
}

/* Setup hint */
.login-setup-hint {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}

.login-error {
    background: rgba(255, 80, 80, 0.2);
    border: 1px solid rgba(255, 80, 80, 0.4);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #FFD0D0;
    display: none;
}

.login-error.show {
    display: block;
    animation: loginShake 0.4s ease;
}

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

/* Role selector for register */
.login-role-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.login-role-option {
    flex: 1;
    padding: 14px 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.login-role-option:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.login-role-option.active {
    border-color: #FF69B4;
    background: rgba(255, 105, 180, 0.2);
    box-shadow: 0 0 16px rgba(255, 105, 180, 0.2);
}

.login-role-emoji {
    font-size: 32px;
    margin-bottom: 4px;
}

.login-role-label {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

/* Couple code display */
.login-couple-code {
    text-align: center;
    margin: 16px 0;
    padding: 14px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px dashed rgba(255, 215, 0, 0.4);
    border-radius: 12px;
}

.login-couple-code-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.login-couple-code-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 6px;
    color: #FFD700;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.login-couple-code-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
}

/* Particles / floating hearts on login page */
.login-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.login-particle {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: loginFloat 6s ease-in-out infinite;
    pointer-events: none;
}

/* Language toggle on login page */
.login-lang-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
    padding: 6px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    letter-spacing: 1px;
}

.login-lang-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

/* Back to Gate (CDK) button on login page */
.login-back-gate-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.login-back-gate-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

@keyframes loginFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) rotate(0deg);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) rotate(360deg);
    }
}

/* User indicator in top bar */
#user-badge-container {
    position: relative;
}

.login-user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 13px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.login-user-badge:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Password change modal inside login */
.login-modal-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        border-radius: 18px;
    }
    .login-title {
        font-size: 20px;
    }
    .login-couple-code-value {
        font-size: 22px;
        letter-spacing: 4px;
    }
}
