/* ========================================
   AUTH PAGE STYLES - Login & Register
   ======================================== */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff0050, #ff3366);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff3366, #ff0050);
}

/* Body */
.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0e14 0%, #1a1f2e 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.auth-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #0a0e14 0%, 
        #1a1f2e 25%, 
        #2d1b3d 50%, 
        #1a2332 75%, 
        #0a0e14 100%);
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
    z-index: 0;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* Floating Emojis Background */
.auth-body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    background-image: 
        radial-gradient(circle, transparent 20%, rgba(10, 14, 20, 0.95) 100%);
}

/* Emoji Layers */
.emoji-layer {
    position: fixed;
    font-size: 40px;
    opacity: 0.08;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    animation: floatDiagonal 25s linear infinite;
}

.emoji-layer:nth-child(1) {
    top: 10%;
    left: -100%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.emoji-layer:nth-child(2) {
    top: 30%;
    left: -100%;
    animation-delay: -8s;
    animation-duration: 30s;
}

.emoji-layer:nth-child(3) {
    top: 50%;
    left: -100%;
    animation-delay: -16s;
    animation-duration: 35s;
}

.emoji-layer:nth-child(4) {
    top: 70%;
    left: -100%;
    animation-delay: -24s;
    animation-duration: 28s;
}

.emoji-layer:nth-child(5) {
    top: 90%;
    left: -100%;
    animation-delay: -12s;
    animation-duration: 32s;
}

@keyframes floatDiagonal {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    100% {
        transform: translateX(200vw) translateY(-30px) rotate(10deg);
    }
}

/* Auth Container - Two Panel Layout */
.auth-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Auth Panels */
.auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* Left Panel - Branding */
.auth-panel-left {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.1) 0%, rgba(0, 242, 234, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.auth-panel-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 80, 0.2) 0%, transparent 70%);
    animation: bgRotate 30s linear infinite;
}

@keyframes bgRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-branding {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff0050, #ff3366);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 10px 40px rgba(255, 0, 80, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 15px 50px rgba(255, 0, 80, 0.5);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.auth-logo i {
    font-size: 40px;
    color: #ffffff;
    animation: iconSpin 4s ease-in-out infinite;
}

@keyframes iconSpin {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.auth-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #ff0050, #ff3366, #00f2ea, #ff0050);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 5s ease infinite;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.auth-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 48px;
    line-height: 1.6;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}

.feature {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(8px);
}

.feature i {
    font-size: 28px;
    color: #ff0050;
    width: 40px;
    text-align: center;
}

.feature-mira-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 0, 80, 0.5));
    animation: miraPulse 2s ease-in-out infinite;
}

@keyframes miraPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 0, 80, 0.5));
    }
    50% { 
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(255, 0, 80, 0.8));
    }
}

.feature span {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
}

/* Right Panel - Form */
.auth-panel-right {
    background: #0a0e14;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 440px;
    animation: fadeInRight 0.8s ease;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #ffffff;
}

.auth-form-header p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.input-wrapper input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

.input-wrapper input:focus {
    border-color: #ff0050;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.1), 0 4px 12px rgba(255, 0, 80, 0.15);
    transform: translateY(-1px);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    z-index: 1;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
}

.error-message {
    font-size: 13px;
    color: #ff3366;
    margin-top: 4px;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

.password-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* Form Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.form-checkbox input[type="checkbox"] {
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
    outline: none;
}

.form-checkbox input[type="checkbox"]:hover {
    border-color: rgba(255, 0, 80, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.form-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #ff0050, #ff3366);
    border-color: #ff0050;
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.forgot-link,
.auth-link {
    color: #ff0050;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-link:hover,
.auth-link:hover {
    color: #ff3366;
    text-decoration: underline;
}

/* Buttons */
.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.btn-auth:disabled::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: buttonSpin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes buttonSpin {
    to { transform: rotate(360deg); }
}

.btn-primary {
    background: linear-gradient(135deg, #ff0050, #ff3366);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 0, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 0, 80, 0.6);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-social {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-social:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Form Divider */
.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.form-divider span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* Form Footer */
.auth-form-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-form-footer p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Form Message */
.form-message {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.form-message.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: messageShake 0.5s ease;
}

@keyframes messageShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-message.success {
    background: rgba(0, 242, 234, 0.1);
    border: 1px solid rgba(0, 242, 234, 0.3);
    color: #00f2ea;
}

.form-message.error {
    background: rgba(255, 0, 80, 0.1);
    border: 1px solid rgba(255, 0, 80, 0.3);
    color: #ff3366;
}

.form-message.info {
    background: rgba(100, 150, 255, 0.1);
    border: 1px solid rgba(100, 150, 255, 0.3);
    color: #6496ff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-panel-left {
        display: none;
    }
    
    .auth-panel-right {
        flex: 1;
    }
    
    .emoji-layer {
        font-size: 32px;
    }
}

@media (max-width: 640px) {
    .auth-panel {
        padding: 24px 20px;
    }
    
    .auth-form-wrapper {
        max-width: 100%;
    }
    
    .auth-form-header h2 {
        font-size: 28px;
    }
    
    .form-checkbox {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forgot-link {
        margin-left: 26px;
    }
    
    .emoji-layer {
        font-size: 24px;
    }
    
    .auth-title {
        font-size: 36px;
    }
    
    .auth-subtitle {
        font-size: 16px;
    }
    
    .feature {
        padding: 16px;
    }
    
    .feature i,
    .feature-mira-icon {
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
}
