/* Login Modal Styles */

/* Login Footer Buttons */
.login-footer {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
    align-items: center;
}

.btn-signup, .btn-forgot-password {
    background: transparent;
    border: none;
    color: #666;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.btn-signup:hover, .btn-forgot-password:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.btn-signup::after, .btn-forgot-password::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.btn-signup:hover::after, .btn-forgot-password:hover::after {
    width: 80%;
}

/* 구분선 추가 */
.login-footer::before {
    content: '|';
    color: #ddd;
    font-size: 0.8rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Signup Modal Styles */
.signup-footer, .forgot-password-footer {
    margin-top: 20px;
    text-align: center;
}

.btn-signup-submit, .btn-find-password {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-signup-submit:hover, .btn-find-password:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-signup-submit:disabled, .btn-find-password:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-back-to-login {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-back-to-login:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

/* Input Group for ID check button */
.input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-group input {
    flex: 1;
}

.btn-check-duplicate {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
}

.btn-check-duplicate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-check-duplicate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Verification Button */
.btn-verification {
    width: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-verification:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-verification:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-verification i {
    font-size: 1.1rem;
}

/* Verification Status */
.verification-status {
    font-size: 0.8rem;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    display: none;
}

.verification-status.success {
    background: #ecfdf5;
    color: #10b981;
    border: 1px solid #a7f3d0;
    display: block;
}

.verification-status.error {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
    display: block;
}

/* Terms Agreement */
.terms-agreement {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.agreement-item {
    margin-bottom: 12px;
}

.agreement-item:last-of-type {
    margin-bottom: 15px;
}

.agreement-all {
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
    margin-top: 15px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    line-height: 1.5;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: white;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #667eea;
}

.checkbox-label input:checked ~ .checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.agreement-text {
    color: #374151;
    line-height: 1.5;
}

.agreement-text strong {
    color: #ef4444;
    font-weight: 600;
}

.all-agree .agreement-text {
    font-weight: 600;
    color: #1f2937;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
    font-size: 0.85rem;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Validation Messages */
.validation-message {
    font-size: 0.8rem;
    margin-top: 5px;
    min-height: 1rem;
    display: block;
}

.validation-message.success {
    color: #10b981;
}

.validation-message.error {
    color: #ef4444;
}

.validation-message.warning {
    color: #f59e0b;
}

/* Form Styles for all modals */
.signup-form .form-group,
.forgot-password-form .form-group {
    margin-bottom: 20px;
}

.signup-form .form-group label,
.forgot-password-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.signup-form .form-group input,
.forgot-password-form .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.signup-form .form-group input:focus,
.forgot-password-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Modal positioning fix */
.modal.show {
    display: flex;
}

.modal-content {
    margin: 0;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.signup-modal {
    max-width: 450px;
}

/* Compact form styles */
.signup-form .form-group {
    margin-bottom: 18px;
}

.terms-agreement {
    margin: 18px 0;
    padding: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: calc(100vh - 20px);
        width: 100%;
    }
    
    .login-modal .modal-header {
        padding: 20px 20px 15px;
    }
    
    .login-modal .modal-body {
        padding: 15px 20px 20px;
    }
    
    .signup-form .form-group {
        margin-bottom: 15px;
    }
    
    .terms-agreement {
        padding: 15px;
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .login-footer {
        gap: 20px;
        margin-top: 20px;
    }
    
    .login-footer::before {
        display: none;
    }
    
    .btn-signup, .btn-forgot-password {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    .login-modal .modal-header {
        padding: 15px 15px 10px;
    }
    
    .login-modal .modal-body {
        padding: 10px 15px 15px;
    }
    
    .signup-form .form-group {
        margin-bottom: 12px;
    }
    
    .terms-agreement {
        padding: 12px;
        margin: 12px 0;
    }
    
    .checkbox-label {
        font-size: 0.85rem;
        padding-left: 25px;
    }
    
    .checkmark {
        width: 16px;
        height: 16px;
    }
    
    .checkmark:after {
        left: 4px;
        top: 1px;
        width: 5px;
        height: 9px;
    }
    
    .btn-verification {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .agreement-text {
        line-height: 1.4;
    }
    
    .terms-link {
        font-size: 0.8rem;
    }
}
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    max-height: none;
    overflow-y: visible;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    margin: 20px auto;
    position: relative;
}

/* Login Modal Specific Styles */
.login-modal {
    max-width: 420px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-height: 95vh;
    overflow-y: auto;
}

/* Signup Modal adjustments */
.signup-modal {
    max-width: 450px;
    max-height: 95vh;
    overflow-y: auto;
}

.login-modal .modal-header {
    background: #f8f9fa;
    padding: 30px 40px 20px;
    border-bottom: none;
    position: relative;
}

.login-modal .modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: left;
}

.login-modal .close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    font-weight: normal;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.login-modal .close:hover {
    background: #e9ecef;
    color: #333;
}

.login-modal .modal-body {
    padding: 20px 40px 40px;
    background: #f8f9fa;
}

/* Login Form Styles */
.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .form-group label {
    display: block;
    color: #666;
    font-weight: 400;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.login-form .form-group input {
    width: 100%;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.login-form .form-group input::placeholder {
    color: #adb5bd;
    font-size: 0.9rem;
}

.login-form .form-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Login Button */
.btn-login {
    width: 100%;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-login:hover {
    background: linear-gradient(45deg, #e55a2b, #e6841a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-login:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-login:disabled:hover {
    background: #cccccc;
    transform: none;
    box-shadow: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media screen and (max-width: 480px) {
    .login-modal {
        margin: 10% auto;
        width: 95%;
        max-width: none;
    }
    
    .login-modal .modal-header,
    .login-modal .modal-body {
        padding: 20px;
    }
    
    .login-modal .modal-header {
        padding-bottom: 15px;
    }
    
    .login-modal .modal-body {
        padding-top: 15px;
    }
}