/* Modern Authentication Pages CSS - Fixed Version */
.login-page,
.sign-up-page,
.forget-password-page,
.forget-code-insert-page,
.code-insert-page,
.refresh-password-page {
    width: 100vw;
    height: 100vh;
    min-height: 100dvh;
    display: none;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary, #0f0f1a) 0%, var(--bg-secondary, #1a1a2e) 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    padding: 1rem;
    overflow: hidden;
}

/* Registration Container - Glass Morphism */
.registration-container {
    background: rgba(26, 26, 46, 0.85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem 2.5rem 2.5rem;
    border-radius: 2rem;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInModal 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.registration-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    z-index: 1;
}

.registration-header {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.registration-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.registration-header p {
    color: #d1d5db;
    font-size: 1rem;
    font-weight: 400;
}

/* Registration Form */
.registration-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1.25rem;
}

/* Input Groups */
.input-group {
    position: relative;
    width: 100%;
}

.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    font-size: 1rem;
    color: #ffffff;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-weight: 400;
    line-height: 1.5;
}

.input-field::placeholder {
    color: #9ca3af;
}

.input-field:focus {
    outline: none;
    border-color: #4361ee;
    background: rgba(67, 97, 238, 0.05);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.input-field:not(:placeholder-shown) {
    background: rgba(255, 255, 255, 0.03);
}

/* Input Icons - DÜZELTİLDİ */
.input-group .input-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.25rem;
    pointer-events: none;
    transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

/* Password Toggle - DÜZELTİLDİ */
.password-toggle {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    line-height: 1;
    transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.password-toggle:hover {
    color: #d1d5db;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 1.125rem;
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    color: white;
    border: none;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(67, 97, 238, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

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

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Form Links */
.form-link {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #d1d5db;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem;
    border-radius: 0.5rem;
    position: relative;
    cursor: pointer;
}

.form-link:hover {
    color: #4cc9f0;
    background: rgba(255, 255, 255, 0.05);
}

.form-link::after {
    content: '→';
    opacity: 0;
    margin-left: 0.5rem;
    transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-link:hover::after {
    opacity: 1;
    transform: translateX(4px);
}

/* Divider */
.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.form-divider span {
    padding: 0 1rem;
    background: #232338;
    border-radius: 1rem;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.social-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.social-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #4361ee;
    transform: translateY(-1px);
}

.social-button .social-icon {
    font-size: 1.25rem;
    line-height: 1;
}

/* Checkbox Styles - DÜZELTİLDİ */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0.5rem 0;
    cursor: pointer;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex-shrink: 0;
}

.checkbox-input:checked + .checkbox-custom {
    background: #4361ee;
    border-color: #4361ee;
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.checkbox-input:focus-visible + .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

.checkbox-label {
    font-size: 0.95rem;
    color: #d1d5db;
    line-height: 1.4;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.checkbox-label a {
    color: #4cc9f0;
    text-decoration: none;
    transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-label a:hover {
    color: #4361ee;
    text-decoration: underline;
}

/* Messages - DÜZELTİLDİ */
.success-message,
.error-message {
    width: 100%;
    padding: 1rem;
    border-radius: 1rem;
    font-weight: 500;
    text-align: center;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.success-message {
    background: rgba(76, 217, 100, 0.1);
    color: #4ade80;
    border: 1px solid rgba(76, 217, 100, 0.2);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.message-icon {
    font-size: 1.25rem;
    line-height: 1;
}

/* Secret Section */
.secret-section {
    display: none;
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.secret-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

.secret-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    color: #d1d5db;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-all;
    font-family: monospace;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.progress-step {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step.active {
    background: #4361ee;
    transform: scale(1.2);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    width: 100%;
}

.strength-bar {
    display: flex;
    gap: 4px;
    height: 4px;
    margin-bottom: 0.25rem;
    width: 100%;
}

.strength-segment {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.strength-text {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: right;
    display: block;
}

/* Terms and Conditions - YENİ EKLENDİ */
.terms-section {
    margin: 1rem 0;
    width: 100%;
}

.terms-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.5;
    margin: 0.5rem 0;
}

.terms-content::-webkit-scrollbar {
    width: 6px;
}

.terms-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.terms-content::-webkit-scrollbar-thumb {
    background: #4361ee;
    border-radius: 3px;
}

/* Required Field Indicator */
.required-field::after {
    content: '*';
    color: #ef4444;
    margin-left: 4px;
}

/* Form Validation Styles */
.input-field.invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.input-field.valid {
    border-color: #4ade80;
    background: rgba(76, 217, 100, 0.05);
}

.validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
    color: #ef4444;
}

.input-field.invalid + .validation-message {
    display: block;
}

/* Loading Animation */
@keyframes button-loading {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

.submit-button.loading {
    background: linear-gradient(90deg, #4361ee 25%, #7209b7 50%, #4361ee 75%);
    background-size: 200% auto;
    animation: button-loading 1.5s linear infinite;
    color: transparent;
}

/* Animations */
@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes gradientShift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, 10px) scale(1.05);
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .registration-container {
        padding: 2rem 1.5rem;
        max-width: 95vw;
        border-radius: 1.5rem;
    }
    
    .registration-header h1 {
        font-size: 2rem;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .form-link {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .registration-container {
        padding: 1.75rem 1.25rem;
        max-width: 100vw;
        margin: 0 1rem;
        border-radius: 1.25rem;
    }
    
    .registration-header h1 {
        font-size: 1.75rem;
    }
    
    .input-field {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .submit-button {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .form-divider span {
        font-size: 0.8rem;
        padding: 0 0.75rem;
    }
    
    .password-toggle {
        right: 1rem;
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .input-group .input-icon {
        right: 1rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .registration-container,
    .submit-button,
    .form-link,
    .social-button,
    .checkbox-custom,
    .success-message,
    .error-message,
    .gradient-circle,
    .progress-step,
    .strength-segment {
        transition: none;
        animation: none;
    }
    
    .registration-container {
        animation-duration: 0.1s;
    }
}

/* Focus Styles for Accessibility */
.input-field:focus-visible,
.submit-button:focus-visible,
.social-button:focus-visible,
.form-link:focus-visible,
.password-toggle:focus-visible {
    outline: 2px solid #4361ee;
    outline-offset: 2px;
}

.checkbox-input:focus-visible + .checkbox-custom {
    outline: 2px solid #4361ee;
    outline-offset: 2px;
}

/* Dark/Light Mode Support */
@media (prefers-color-scheme: light) {
    .login-page,
    .sign-up-page,
    .forget-password-page,
    .forget-code-insert-page,
    .code-insert-page,
    .refresh-password-page {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    }
    
    .registration-container {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    .input-field {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.15);
        color: #1a1a2e;
    }
    
    .input-field::placeholder {
        color: #64748b;
    }
    
    .registration-header h1 {
        background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .registration-header p {
        color: #64748b;
    }
}

/* Print Styles */
@media print {
    .login-page,
    .sign-up-page,
    .forget-password-page,
    .forget-code-insert-page,
    .code-insert-page,
    .refresh-password-page {
        position: static;
        height: auto;
        background: white !important;
    }
    
    .registration-container {
        box-shadow: none !important;
        border: 2px solid #000 !important;
        background: white !important;
        color: black !important;
        max-width: none !important;
        margin: 2cm auto !important;
    }
    
    .input-field,
    .submit-button,
    .social-button {
        border: 1px solid #000 !important;
        background: white !important;
        color: black !important;
    }
    
    .submit-button {
        background: #333 !important;
        color: white !important;
    }
}

/* Show error/success when needed - DÜZELTİLDİ */
.error-message.show,
.success-message.show {
    display: flex !important;
}

/* Ensure form elements are visible */
.login-page.show,
.sign-up-page.show,
.forget-password-page.show,
.forget-code-insert-page.show,
.code-insert-page.show,
.refresh-password-page.show {
    display: flex !important;
}

/* Prevent scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

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

.submit-button.loading .loading-spinner {
    display: inline-block;
    margin-right: 0.5rem;
}

/* Additional Helper Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Ensure all elements are properly aligned */
* {
    box-sizing: border-box;
}

/* Fix for mobile viewport height */
@supports (-webkit-touch-callout: none) {
    .login-page,
    .sign-up-page,
    .forget-password-page,
    .forget-code-insert-page,
    .code-insert-page,
    .refresh-password-page {
        min-height: -webkit-fill-available;
    }
}