/* Auth Pages Styling - Layout düzeltmeleri */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main content wrapper for auth pages */
.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 100px; /* Header height */
    min-height: calc(100vh - 200px); /* Header + footer height */
}

.container {
    max-width: 1336px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 3rem 0;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.auth-form {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    width: 100%;
    margin: 0 1rem;
    border: 1px solid var(--border-color);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
}

.auth-form p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: var(--bg-secondary);
    color: var(--text-color);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:hover {
    border-color: var(--primary-color);
}

.form-group input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

body.dark-mode .form-group input::placeholder {
    color: #64748b;
}

.form-group small {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-link {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-light);
    font-size: 1rem;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.auth-link a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.btn-secondary {
    flex: 1;
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .auth-form {
        max-width: 90vw;
    }
    .auth-container {
        max-width: 98vw;
    }
}

@media (max-width: 768px) {
    .auth-main {
        margin-top: 120px;
    }
    
    .auth-container {
        min-height: 60vh;
        padding: 2rem 0;
        max-width: 100vw;
    }
    
    .auth-form {
        padding: 2rem;
        margin: 0 0.75rem;
        max-width: 100vw;
        width: 100%;
    }
    
    .auth-form h2 {
        font-size: 1.75rem;
    }
    
    .forgot-password-content {
        padding: 2rem;
    }
    
    .forgot-password-actions {
        flex-direction: column;
    }
    
    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-form {
        padding: 1.5rem;
        margin: 0 0.5rem;
        max-width: 100vw;
        width: 100%;
    }
    
    .auth-form h2 {
        font-size: 1.5rem;
    }
    
    .form-group input {
        padding: 0.875rem;
    }
    
    .btn-primary {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
}

/* Remember Me Checkbox Styling */
.form-group.remember-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.custom-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
    margin: 0;
}

.custom-checkbox input[type="checkbox"] {
    opacity: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 0;
}

.custom-checkbox label {
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.2s;
}

.custom-checkbox input[type="checkbox"]:checked + label:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 8px;
    height: 14px;
    border: solid var(--primary-color);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.custom-checkbox input[type="checkbox"]:focus + label {
    border-color: var(--primary-hover);
}

.remember-label {
    margin-left: 8px;
    font-size: 1rem;
    color: var(--text-color);
}

/* Alert Error Styling */
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.4;
}

body.dark-mode .alert-error {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-error a {
    color: #721c24;
    text-decoration: underline;
    font-weight: bold;
}

body.dark-mode .alert-error a {
    color: #fca5a5;
}

.alert-error a:hover {
    text-decoration: none;
}

/* Dark mode for alert success */
body.dark-mode .alert-success {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

body.dark-mode .alert-info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Terms and Privacy Groups */
.form-group.terms-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    flex-direction: column;
}

.terms-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.custom-checkbox input[type="checkbox"]:checked + label {
    cursor: default;
}

.terms-label {
    margin-left: 8px;
    font-size: 1rem;
    color: var(--text-color);
}

.terms-label a {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

.terms-label a:hover {
    text-decoration: none;
}

/* Modal Styling */
.terms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .terms-modal-overlay {
    background: rgba(0,0,0,0.85);
}

.terms-modal {
    background: var(--bg-primary);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px 24px 24px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
    animation: modalFadeIn 0.3s;
}

body.dark-mode .terms-modal {
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.terms-modal h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 18px;
}

.terms-modal h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.terms-modal ul {
    padding-left: 18px;
    margin-bottom: 18px;
}

.terms-modal li {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.5;
}

.terms-modal .modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    position: sticky;
    bottom: 0;
    background: var(--bg-primary);
    padding-top: 15px;
}

.terms-modal .btn-terms-cancel,
.terms-modal .btn-terms-accept {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
    min-width: 120px;
    box-sizing: border-box;
    text-align: center;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}

.terms-modal .btn-terms-cancel {
    background: #6c757d;
    color: #fff;
}

.terms-modal .btn-terms-cancel:hover {
    background: #545b62;
}

.terms-modal .btn-terms-accept {
    background: var(--primary-color);
    color: #fff;
}

.terms-modal .btn-terms-accept:hover {
    background: var(--primary-hover);
}

.terms-modal .close-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #888;
    cursor: pointer;
}

.terms-modal .close-modal:hover {
    color: var(--primary-color);
}

/* Modal Info Boxes */
.modal-warning-box {
    background: rgba(255,193,7,0.1);
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
    border-left: 3px solid #ffc107;
}

body.dark-mode .modal-warning-box {
    background: rgba(255, 193, 7, 0.15);
}

.modal-warning-box p {
    margin: 0;
    color: #856404;
    font-weight: 600;
    font-size: 14px;
}

body.dark-mode .modal-warning-box p {
    color: #ffc107;
}

.modal-warning-box h4 {
    color: #856404;
    margin: 0 0 8px 0;
    font-weight: 600;
}

body.dark-mode .modal-warning-box h4 {
    color: #ffc107;
}

.modal-info-box {
    background: rgba(106,176,251,0.08);
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
    border-left: 3px solid #007bff;
}

body.dark-mode .modal-info-box {
    background: rgba(59, 130, 246, 0.15);
}

.modal-info-box p {
    margin: 0;
    color: #007bff;
    font-weight: 600;
    font-size: 14px;
}

body.dark-mode .modal-info-box p {
    color: #3b82f6;
}

.modal-purple-box {
    background: rgba(111,66,193,0.1);
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
    border-left: 3px solid #6f42c1;
}

body.dark-mode .modal-purple-box {
    background: rgba(139, 92, 246, 0.15);
}

.modal-purple-box h4 {
    color: #4a2c7a;
    margin: 0 0 8px 0;
    font-weight: 600;
}

body.dark-mode .modal-purple-box h4 {
    color: #a78bfa;
}

.modal-purple-box p {
    color: #4a2c7a;
    margin: 0;
    font-size: 14px;
}

body.dark-mode .modal-purple-box p {
    color: #c4b5fd;
}

.modal-link-center {
    text-align: center;
    margin: 16px 0 0 0;
}

.modal-link-center a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

.modal-link-center a:hover {
    text-decoration: none;
}

/* Select Styling */
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-color);
    transition: border-color 0.2s;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

select option {
    padding: 8px;
}

/* Password Input Container */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    color: #666;
    transition: color 0.2s;
}

body.dark-mode .password-toggle {
    color: #94a3b8;
}

.password-toggle:hover {
    color: #333;
}

body.dark-mode .password-toggle:hover {
    color: #e2e8f0;
}

.eye-icon {
    display: inline-block;
    font-size: 16px;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    font-size: 0.9rem;
}

.password-strength.weak {
    color: #dc3545;
}

.password-strength.medium {
    color: #ffc107;
}

.password-strength.strong {
    color: #28a745;
}

body.dark-mode .password-strength.weak {
    color: #ff6b6b;
}

body.dark-mode .password-strength.medium {
    color: #ffc107;
}

body.dark-mode .password-strength.strong {
    color: #51cf66;
}

.password-requirements {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #6c757d;
}

body.dark-mode .password-requirements {
    color: #94a3b8;
}

.password-requirements ul {
    margin: 4px 0 0 0;
    padding-left: 16px;
}

.password-requirements li {
    margin-bottom: 2px;
}

.password-requirements li.valid {
    color: #28a745;
}

body.dark-mode .password-requirements li.valid {
    color: #51cf66;
}

.password-requirements li.invalid {
    color: #dc3545;
}

body.dark-mode .password-requirements li.invalid {
    color: #ff6b6b;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}