/* ===========================================
   Vibe In Pocket - Login Page Styles
   Ocean-themed authentication experience
   =========================================== */

/* ============ Force Scrolling on Login Page ============ */
html:has(body.login-page),
html:has(.login-page) {
    overflow: auto !important;
    overflow-y: scroll !important;
    height: auto !important;
}

body.login-page {
    overflow: visible !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a1628 0%, #134e6f 50%, #1a7a9e 100%);
    background-attachment: fixed;
    position: relative;
    display: block;
    padding: 0;
    margin: 0;
}

.ocean-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.ocean-bg .wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 200px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath fill='rgba(255,255,255,0.08)' d='M0,60 C300,120 600,0 900,60 C1200,120 1200,120 1200,120 L0,120 Z'/%3E%3C/svg%3E") repeat-x;
    animation: wave-move 15s linear infinite;
}

.ocean-bg .wave-1 { bottom: 0; animation-duration: 12s; opacity: 0.6; }
.ocean-bg .wave-2 { bottom: 30px; animation-duration: 18s; opacity: 0.4; animation-direction: reverse; }
.ocean-bg .wave-3 { bottom: 60px; animation-duration: 24s; opacity: 0.2; }

@keyframes wave-move {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.floating-elements {
    position: absolute;
    inset: 0;
}

.float-item {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation: float-around 20s ease-in-out infinite;
}

.float-item:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.float-item:nth-child(2) { left: 80%; top: 15%; animation-delay: 5s; }
.float-item:nth-child(3) { left: 15%; top: 70%; animation-delay: 10s; }
.float-item:nth-child(4) { left: 85%; top: 75%; animation-delay: 15s; }

@keyframes float-around {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(10deg); }
    50% { transform: translate(-10px, 10px) rotate(-5deg); }
    75% { transform: translate(15px, 15px) rotate(5deg); }
}

/* ============ Login Container ============ */
.login-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto; /* Center horizontally */
    padding: 4rem 2rem;
    z-index: 10;
    box-sizing: border-box;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    text-decoration: none;
}

.login-logo .logo-icon {
    font-size: 2rem;
    animation: float-gentle 3s ease-in-out infinite;
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.login-logo .logo-accent {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff9f43 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============ Login Card ============ */
.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: card-enter 0.6s ease-out;
}

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

/* ============ Auth Tabs ============ */
.auth-tabs {
    display: flex;
    position: relative;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.auth-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.7);
}

.auth-tab.active {
    color: white;
}

.auth-tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #ff6b9d 0%, #ff9f43 100%);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 0;
}

.auth-tabs:has(#signupTab.active) .auth-tab-indicator {
    transform: translateX(100%);
}

/* ============ Form Styles ============ */
.auth-form {
    animation: form-fade 0.3s ease-out;
}

@keyframes form-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-wrapper input:focus {
    outline: none;
    border-color: #ff6b9d;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.2);
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.strength-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.password-strength[data-strength="weak"] .strength-bar::after {
    width: 25%;
    background: #ef4444;
}

.password-strength[data-strength="fair"] .strength-bar::after {
    width: 50%;
    background: #f59e0b;
}

.password-strength[data-strength="good"] .strength-bar::after {
    width: 75%;
    background: #22c55e;
}

.password-strength[data-strength="strong"] .strength-bar::after {
    width: 100%;
    background: #22c55e;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 50px;
    text-align: right;
}

.password-strength[data-strength="weak"] .strength-text { color: #ef4444; }
.password-strength[data-strength="fair"] .strength-text { color: #f59e0b; }
.password-strength[data-strength="good"] .strength-text { color: #22c55e; }
.password-strength[data-strength="strong"] .strength-text { color: #22c55e; }

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff9f43 100%);
    border-color: transparent;
}

.checkbox-custom::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.forgot-link {
    font-size: 0.9rem;
    color: #ff6b9d;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.forgot-link:hover {
    opacity: 0.8;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Submit Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff9f43 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
}

.btn-full {
    width: 100%;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Auth Messages */
.auth-error,
.auth-success {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    animation: message-enter 0.3s ease-out;
}

@keyframes message-enter {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.auth-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* ============ Divider ============ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

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

.auth-divider span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============ Social Buttons ============ */
.social-buttons {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-icon {
    width: 20px;
    height: 20px;
}

/* ============ Footer ============ */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.login-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #ff6b9d;
}

/* ============ Toast ============ */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ============ Utilities ============ */
.hidden {
    display: none !important;
}

/* ============ Responsive ============ */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .login-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .login-footer span {
        display: none;
    }
}

