/* Modern Auth System - Card Based Design */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

body.dark-mode .auth-card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
}

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

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

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.auth-mode-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.auth-mode-indicator i {
    font-size: 1rem;
}

/* Form Sections */
.auth-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.auth-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Row for side-by-side inputs */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .input-group-v2 {
    flex: 1;
}

/* Action Links */
.auth-actions {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    margin: 0 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
}

.auth-link:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    text-decoration: none;
}

.auth-link.primary {
    color: var(--text-primary);
    font-weight: 500;
}

/* Success/Error Messages */
.auth-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid;
}

.auth-message.success {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.auth-message.error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

body.dark-mode .auth-message.error {
    background: #2d1b1b;
    color: #ff6b6b;
    border-color: #4a2626;
}

/* Form Description */
.form-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    text-align: center;
}

/* Loading State */
.btn-login-v2.loading {
    position: relative;
    color: transparent;
}

.btn-login-v2.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-top: 2px solid #808080;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

body.dark-mode .btn-login-v2.loading::after {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
}

.btn-reset.loading {
    position: relative;
    color: transparent !important;
}

.btn-reset.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-top: 2px solid #808080;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

body.dark-mode .btn-reset.loading::after {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 12px;
    }
    
    .auth-title {
        font-size: 1.6rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auth-actions {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .auth-link {
        display: block;
        margin: 0.5rem 0;
    }
}

/* Error message styling - mevcut sistemle uyumlu */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

body.dark-mode .error-message {
    color: #ff6b6b;
}

/* Terms and Privacy Checkboxes */
.terms-checkboxes {
    margin: 1.5rem 0;
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.75rem;
    margin-top: 0.2rem;
    transform: scale(1.1);
    cursor: pointer;
    float: left;
}

.checkbox-label {
    display: block;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
    cursor: pointer;
    overflow: hidden;
    padding-left: 0;
}

.terms-link {
    color: var(--text-primary);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Terms Modal Styles */
.terms-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.terms-modal .modal-content {
    background: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.terms-modal .modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.terms-modal .modal-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.terms-modal .close {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.terms-modal .close:hover {
    color: var(--text-primary);
}

.terms-modal .modal-body {
    padding: 2rem;
    flex-grow: 1;
    color: var(--text-primary);
    line-height: 1.6;
    max-height: 60vh;
}

/* Dashboard scroll container for modals */
.terms-modal .modal-body.dashboard-scroll-container {
    max-height: 60vh !important;  /* Override style.css max-height: 300px */
    overflow-y: auto !important;
    /* scrollbar görünümü style.css'teki dashboard-scroll-container standardından gelsin */
}

.terms-modal .modal-body h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.terms-modal .modal-body h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.terms-modal .modal-body p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.terms-modal .modal-body ul, .terms-modal .modal-body ol {
    color: var(--text-primary);
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.terms-modal .modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.terms-modal .modal-body .notice {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-color);
    opacity: 0.85;
    border-radius: 0.5rem;
    background-color: var(--bg-secondary);
    margin: 1rem 0;
}

.terms-modal .modal-body a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.terms-modal .modal-body strong {
    font-weight: 600;
}

.terms-modal .modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.terms-modal .modal-footer .btn-login-v2 {
    width: auto;
    padding: 0.75rem 2rem;
    margin: 0;
}

.terms-modal .modal-footer .btn-login-v2:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button disabled state */
.btn-login-v2:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--text-secondary) !important;
}

body.dark-mode .btn-login-v2:disabled {
    background-color: var(--text-secondary) !important;
    color: var(--bg-primary) !important;
}

/* Reset Password Page Specific Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(var(--text-primary-rgb), 0.1);
}

.btn-reset {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-reset:hover {
    background: var(--text-secondary);
    transform: translateY(-1px);
}

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

.back-link {
    text-align: center;
    margin-top: 1.5rem;
}

.back-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: var(--text-primary);
}

.security-notice {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.password-requirements {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.2);
    color: #198754;
}

/* Mobile responsive for modals */
@media (max-width: 480px) {
    .terms-modal .modal-content {
        margin: 2% auto;
        width: 95%;
        max-height: 90vh;
    }
    
    .terms-modal .modal-header,
    .terms-modal .modal-body,
    .terms-modal .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .checkbox-label {
        font-size: 0.85rem;
    }
}
