/**
 * Login Page Styles
 * Modern split-layout design with hero section and form
 */

/* Main Layout */
main.contain{
    padding:0;
}
.login-page {
    min-height: calc(100vh - 60px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--color-background-body);
}

/* Hero Section - Left Side */
.login-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: linear-gradient(135deg, 
        rgba(93, 156, 236, 0.15) 0%, 
        rgba(127, 191, 255, 0.08) 50%,
        rgba(93, 156, 236, 0.05) 100%);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo img {
    height: 50px;
    width: auto;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--color-text-heading);
    line-height: 1.2;
    margin: 0 0 1rem 0;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0 0 2.5rem 0;
}

/* Feature Items */
.hero-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary-transparent), rgba(127, 191, 255, 0.15));
    border-radius: 12px;
    color: var(--color-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-text h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-heading);
}

.feature-text p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Decorative Glow */
.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(93, 156, 236, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* Forms Section - Right Side */
.login-forms {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--color-background-component-dark);
}

.login-card {
    width: 100%;
    max-width: 480px;
    background: var(--color-background-component);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--color-text-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-footer i {
    color: var(--color-success);
}

/* Messages */
.login-message {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    text-align: center;
}

.login-message-warning {
    background: var(--color-warning-transparent);
    color: var(--color-warning);
    border: 1px solid rgba(252, 211, 77, 0.3);
}

.login-message-error {
    background: var(--color-danger-transparent);
    color: var(--color-danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.login-message-success {
    background: var(--color-success-transparent);
    color: var(--color-success);
    border: 1px solid rgba(110, 231, 183, 0.3);
}

/* Forms */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form.hide {
    display: none;
}

.login-form h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-heading);
    text-align: center;
}

.form-subtitle {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    text-align: center;
}

.form-subtitle a {
    color: var(--color-primary);
    font-weight: 600;
    transition: color 0.2s;
}

.form-subtitle a:hover {
    color: var(--color-primary-light);
    text-decoration: none;
}

/* Free Credits Banner */
.free-credits-banner { 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15) 0%, rgba(46, 204, 113, 0.1) 100%);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: var(--radius-medium);
    color: var(--color-success);
    font-size: 0.95rem;
}

.free-credits-banner i {
    font-size: 1.1rem;
}

.free-credits-banner strong {
    color: var(--color-token-gold);
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.form-row a {
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.form-row a:hover {
    color: var(--color-primary);
}

/* Labels */
.login-form label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-body);
}

/* Inputs */
.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text-body);
    background: var(--color-background-component-dark);
    border: 1px solid var(--color-border-default);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-form input::placeholder {
    color: var(--color-text-subtle);
}

.login-form input:hover {
    border-color: var(--color-border-default);
    background: rgba(0, 0, 0, 0.2);
}

.login-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-transparent);
    background: rgba(0, 0, 0, 0.3);
}

.login-form input.has-error {
    border-color: var(--color-danger);
}

.login-form input.has-error:focus {
    box-shadow: 0 0 0 3px var(--color-danger-transparent);
}

/* Error Text */
.error-text {
    font-size: 0.8rem;
    color: var(--color-danger);
}

.error-text:empty {
    display: none;
}

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.checkbox input {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Buttons */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--color-text-on-primary);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 4px 15px rgba(93, 156, 236, 0.3);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(93, 156, 236, 0.4);
    filter: brightness(1.05);
}

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

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit .btn-spinner {
    display: none;
}

.btn-submit.loading .btn-label {
    display: none;
}

.btn-submit.loading .btn-spinner {
    display: inline;
}

.btn-cancel {
    flex: 1;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--color-text-body);
    background: var(--color-background-button-secondary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-cancel:hover {
    background: var(--color-background-button-secondary-hover);
}

.btn-cancel:active {
    transform: scale(0.98);
}

.form-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-buttons .btn-submit {
    flex: 2;
    margin-top: 0;
}

/* Terms */
.terms {
    font-size: 0.8rem;
    color: var(--color-text-subtle);
    text-align: center;
    margin: 0.5rem 0 0 0;
}

.terms a {
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.terms a:hover {
    color: var(--color-primary);
}

/* Loading State */
.login-form.loading input,
.login-form.loading button {
    pointer-events: none;
    opacity: 0.7;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-text-subtle);
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border-default);
}

.divider span {
    padding: 0 1rem;
}

/* OAuth Buttons */
.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-oauth:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-oauth:active {
    transform: translateY(0) scale(0.98);
}

.btn-google {
    background: #fff;
    color: #444;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f8f8f8;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-page {
        grid-template-columns: 1fr;
    }
    
    .login-hero {
        display: none;
    }
    
    .login-forms {
        min-height: calc(100vh - 60px);
    }
}

@media (max-width: 480px) {
    .login-forms {
        padding: 1rem;
    }
    
    .login-card {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .login-form h2 {
        font-size: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}
