/* Görev Uygulaması - Login Sayfası Stilleri */

/* CSS Variables - Dark Theme */
:root {
    --bg-primary: #1a1d29;
    --bg-secondary: #252836;
    --bg-tertiary: #2d303e;
    --text-primary: #ffffff;
    --text-secondary: #a0a3bd;
    --accent: #EA4335;
    --accent-hover: #D93025;
    --border: #3d4054;
    --focus-color: #5B9FFF;
}

/* Reset & Normalize */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1d29 0%, #252836 50%, #1a1d29 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(234, 67, 53, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(91, 159, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}


/* Login Wrapper - Flexbox Centering */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Login Container - Card/Modal */
.login-container {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(160, 163, 189, 0.22);
    padding: 24px;
    width: 90%;
    max-width: 480px;
    animation: fadeInUp 0.6s ease-out;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: rgba(45, 48, 62, 0.85);
    border: 1px solid rgba(160, 163, 189, 0.2);
    overflow: hidden;
}

.auth-brand-logo {
    width: 52px;
    height: 32px;
    max-width: 52px;
    max-height: 32px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(26, 29, 41, 0.75);
    border: 1px solid rgba(160, 163, 189, 0.18);
    padding: 3px;
}

.auth-brand-fallback {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.auth-brand-text strong {
    font-size: 14px;
    line-height: 1.2;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-brand-text span {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop Styles */
@media (min-width: 768px) {
    .login-container {
        padding: 40px;
    }
}


/* Login Title */
.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}

/* Login Subtitle */
.login-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.5;
}

/* Desktop Typography */
@media (min-width: 768px) {
    .login-title {
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .login-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
}

/* Form Styles */
.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.password-wrapper .form-input {
    padding-right: 48px;
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.form-input:focus {
    outline: none;
    border-color: var(--focus-color);
    background-color: var(--bg-secondary);
}

.form-input:hover {
    border-color: rgba(91, 159, 255, 0.5);
}

.form-helper {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.form-helper.error {
    color: #f87171;
}

.form-helper.ok {
    color: #34d399;
}

.captcha-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
    align-items: center;
}

.captcha-question {
    height: 48px;
    padding: 12px 14px;
    background: rgba(102, 126, 234, 0.12);
    border: 1px dashed rgba(102, 126, 234, 0.4);
    border-radius: 8px;
    color: #dbe4ff;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.captcha-input {
    text-align: center;
    font-weight: 700;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Forgot Password Link */
.forgot-password {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--text-primary);
}

/* Login Button */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .spinner {
    display: block !important;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border);
}

.divider span {
    padding: 0 16px;
}

/* Google Login Button - Redesigned */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 48px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-btn:hover {
    background-color: var(--bg-secondary);
    border-color: rgba(91, 159, 255, 0.5);
    transform: translateY(-1px);
}

.google-btn:active {
    transform: translateY(0);
}

.google-btn:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.google-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Google Icon */
.google-icon {
    width: 20px;
    height: 20px;
}

/* Desktop Button */
@media (min-width: 768px) {
    .google-btn,
    .login-btn {
        height: 52px;
        font-size: 16px;
    }
}

/*
 Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading State */
.google-btn.loading .btn-text {
    display: none;
}

.google-btn.loading .spinner {
    display: block !important;
}

.google-btn.loading {
    pointer-events: none;
}


/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px;
    background-color: rgba(234, 67, 53, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

.error-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.error-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Signup Link */
.signup-link {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.signup-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.signup-link a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.signup-link a:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
    border-radius: 2px;
}


/* Accessibility - Focus States */
*:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Keyboard Navigation */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}


/* Success Message */
.success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px;
    background-color: rgba(52, 168, 83, 0.1);
    border: 1px solid #34A853;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

.success-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.success-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

.back-link svg {
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-3px);
}


/* Select Dropdown */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23a0a3bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-select:hover {
    border-color: rgba(91, 159, 255, 0.5);
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%235B9FFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.form-select option {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 8px;
}

.form-select option:hover {
    background-color: var(--bg-secondary);
}


/* Custom City Select */
.custom-select-wrapper {
    position: relative;
}

.city-search {
    cursor: pointer;
}

.city-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.city-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--text-primary);
    font-size: 14px;
}

.city-option:hover {
    background-color: var(--bg-secondary);
}

.city-option.selected {
    background-color: rgba(102, 126, 234, 0.2);
}

.city-option.hidden {
    display: none;
}

/* Checkbox Container */
.agreements {
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
    padding-left: 32px;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 20px;
    width: 20px;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-container:hover .checkmark {
    border-color: var(--focus-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--focus-color);
    border-color: var(--focus-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.agreement-link {
    color: #f3f6ff;
    text-decoration: underline;
    text-decoration-color: rgba(243, 246, 255, 0.7);
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.auth-info-list {
    margin-top: 12px;
    display: grid;
    gap: 6px;
}

.auth-info-item {
    font-size: 12px;
    color: #c8cde0;
    background: rgba(26, 29, 41, 0.55);
    border: 1px solid rgba(160, 163, 189, 0.2);
    border-radius: 8px;
    padding: 7px 9px;
    line-height: 1.4;
}

@media (max-width: 767px) {
    .auth-info-list {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-brand-logo {
        width: 46px;
        height: 28px;
        max-width: 46px;
        max-height: 28px;
    }

    .auth-brand-text strong {
        font-size: 13px;
    }

    .auth-brand-text span {
        font-size: 10px;
    }
}

.agreement-link:hover {
    color: #ffffff;
    text-decoration-color: #ffffff;
}

.email-provider-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.email-provider-hint.error {
    color: #f87171;
}

.email-provider-hint.ok {
    color: #34d399;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: modalFadeIn 0.3s ease-out;
}

.modal-small {
    max-width: 400px;
}

.agreement-modal-content {
    max-width: 540px;
    max-height: 78vh;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 14px;
}

.modal-body h3 {
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-btn-secondary:hover {
    background: var(--bg-primary);
    box-shadow: none;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .modal {
        padding: 12px;
    }

    .modal-content {
        max-height: 90vh;
    }

    .agreement-modal-content {
        max-width: 100%;
        max-height: 86vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .modal-title {
        font-size: 18px;
    }
}

@media (max-width: 520px) {
    .captcha-row {
        grid-template-columns: 1fr;
    }
}
