/* Modern Auth Pages Styling */

.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--bg-primary);
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    min-height: 700px;
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--card-border);
}

/* Side Panel - Decorative */
.auth-side-panel {
    background: var(--gradient-primary);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-side-content {
    position: relative;
    z-index: 2;
}

.auth-side-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-family: 'Prompt', sans-serif;
    color: white;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-side-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.auth-side-title span {
    display: block;
    opacity: 0.9;
}

.auth-side-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auth-side-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-feature-icon {
    font-size: 1.1rem;
}

/* Floating decorative characters */
.auth-side-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.floating-char {
    position: absolute;
    font-family: 'Prompt', sans-serif;
    color: rgba(255, 255, 255, 0.1);
    font-size: 6rem;
    font-weight: 700;
}

.floating-char.char-1 {
    top: 10%;
    right: 10%;
    animation: float1 8s ease-in-out infinite;
}

.floating-char.char-2 {
    bottom: 20%;
    right: 25%;
    font-size: 4rem;
    animation: float2 10s ease-in-out infinite;
}

.floating-char.char-3 {
    bottom: 10%;
    left: 10%;
    font-size: 5rem;
    animation: float3 12s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10px, 20px) rotate(5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, -15px) rotate(-5deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, 10px) rotate(3deg); }
}

/* Main Form Area */
.auth-main {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-logo-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    font-family: 'Prompt', sans-serif;
    color: white;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Form Styling */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Input with icon wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.2s;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--card-border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group input:hover {
    border-color: var(--primary-color);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: var(--card-bg);
}

.form-group input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

/* Password toggle button */
.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Password requirements */
.password-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.req-icon {
    width: 14px;
    height: 14px;
    transition: all 0.2s;
}

.requirement.valid {
    color: #22c55e;
}

.requirement.valid .req-icon {
    stroke: #22c55e;
}

.requirement.valid .req-icon circle {
    fill: #22c55e;
}

.requirement.invalid {
    color: #ef4444;
}

/* Submit button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.btn-submit:hover::before {
    opacity: 1;
}

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

.btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.btn-submit:hover .btn-arrow {
    transform: translateX(4px);
}

/* Messages */
.error-message {
    padding: 0.875rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #ef4444;
    font-size: 0.875rem;
    text-align: center;
    animation: shake 0.5s ease;
}

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

.success-message {
    padding: 0.875rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    color: #22c55e;
    font-size: 0.875rem;
    text-align: center;
}

.progress-message {
    padding: 1.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    color: var(--primary-color);
    font-size: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Hide form fields when loading */
.form-loading .form-group {
    display: none;
}

.form-loading button[type="submit"],
.form-loading .btn-submit {
    display: none;
}

/* Auth footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Validation styles */
.register-form .form-group input:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #ef4444;
}

/* Profile page styles */
.user-info {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.info-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.info-label {
    font-weight: 600;
    color: var(--text-primary);
}

.info-value {
    color: var(--text-secondary);
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text-primary);
    width: 100%;
}

[data-theme="dark"] .form-control {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

/* Responsive Design */
@media (max-width: 900px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-width: 480px;
        min-height: auto;
    }

    .auth-side-panel {
        display: none;
    }

    .auth-main {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 480px) {
    .auth-section {
        padding: 1rem;
    }

    .auth-wrapper {
        border-radius: 20px;
    }

    .auth-main {
        padding: 2rem 1.5rem;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .form-group input {
        padding: 0.75rem 0.875rem 0.75rem 2.75rem;
    }

    .input-icon {
        width: 18px;
        height: 18px;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/* Login page - simpler layout without side panel */
.auth-wrapper.login-wrapper {
    grid-template-columns: 1fr;
    max-width: 480px;
}

.auth-wrapper.login-wrapper .auth-side-panel {
    display: none;
}
