/* Auth Page Styles */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 0;
}

/* Back to Home Button */
.back-home {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.back-home:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.back-home i {
    font-size: 1.1rem;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.auth-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-1);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    animation: bounce 1s ease-out;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.logo-large:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    flex: 1;
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33%;
    background: var(--danger-color);
}

.strength-fill.medium {
    width: 66%;
    background: var(--warning-color);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success-color);
}

.strength-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 80px;
}

.error-message {
    color: var(--danger-color);
    font-size: 0.85rem;
    display: none;
    animation: shake 0.3s;
}

.error-message.show {
    display: block;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--secondary-color);
}

.btn-submit {
    background: var(--gradient-1);
    border: none;
    border-radius: 0.75rem;
    padding: 1.25rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline-block !important;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.social-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.social-btn.google:hover {
    border-color: #db4437;
}

.social-btn.github:hover {
    border-color: #333;
}

.social-btn i {
    font-size: 1.2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Decorative elements */
.auth-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--gradient-1);
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    background: var(--gradient-2);
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    background: var(--gradient-3);
    top: 50%;
    left: -75px;
    animation-delay: 10s;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -20px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(180deg);
    }
    75% {
        transform: translate(20px, 20px) rotate(270deg);
    }
}

/* ==================== Enhanced Mobile Responsiveness ==================== */

/* Tablet (768px) */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .auth-box {
        padding: 2rem 1.5rem;
        border-radius: 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .logo-large {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile (480px) */
@media (max-width: 480px) {
    .auth-page {
        padding: 1rem 0;
    }
    
    .auth-container {
        padding: 0.75rem;
    }
    
    .back-home {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .back-home span {
        display: none;
    }
    
    .back-home i {
        font-size: 1rem;
    }
    
    .auth-box {
        padding: 1.5rem 1.25rem;
        border-radius: 0.75rem;
    }
    
    .logo-large {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .auth-header {
        margin-bottom: 2rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
    
    .auth-form {
        gap: 1.25rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }
    
    .password-input input {
        padding-right: 2.75rem;
    }
    
    .toggle-password {
        right: 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-submit {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .social-btn {
        padding: 0.85rem;
        font-size: 0.9rem;
    }
    
    .checkbox-label,
    .forgot-link {
        font-size: 0.85rem;
    }
    
    .auth-footer {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Decorative circles - smaller on mobile */
    .circle-1 {
        width: 200px;
        height: 200px;
    }
    
    .circle-2 {
        width: 150px;
        height: 150px;
    }
    
    .circle-3 {
        width: 100px;
        height: 100px;
    }
}

/* Extra Small Mobile (360px) */
@media (max-width: 360px) {
    .auth-box {
        padding: 1.25rem 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.3rem;
    }
    
    .logo-large {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .form-group input {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-submit {
        padding: 0.85rem;
        font-size: 0.95rem;
    }
}

/* Language Toggle Fixed Position - Mobile */
@media (max-width: 768px) {
    .lang-toggle-fixed {
        top: 1rem;
        right: 1rem;
    }
    
    .lang-toggle-fixed .lang-toggle {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .form-group input,
    .btn-submit,
    .social-btn,
    .toggle-password {
        min-height: 44px;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    /* Remove hover effects on touch devices */
    .btn-submit:hover,
    .social-btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Add active states for better touch feedback */
    .btn-submit:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .social-btn:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.15);
    }
}
