@import url('login.css');

/* 회원가입 전용 스타일 */

/* 배경색 조정 (이미지와 동일하게) */
body {
    background: #f5f5f5;
}

/* 회원가입 카드 (login-card와 동일하지만 클래스명만 다름) */
.signup-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.signup-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.social-signup {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

/* 이메일 버튼 (회원가입에만 있음) */
.social-btn.email {
    background: #FF6B35;
    border-color: #FF6B35;
    color: #ffffff;
    justify-content: center;
}

.social-btn.email:hover {
    background: #FF5722;
    border-color: #FF5722;
}

/* 회원가입 폼 */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-label {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 45px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
    background: #ffffff;
    font-family: inherit;
}

.password-input-wrapper .form-input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999999;
    font-size: 18px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

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

.password-requirements {
    font-size: 12px;
    color: #999999;
    margin-top: 4px;
}

.form-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.error {
    border-color: #ff6b6b;
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-input::placeholder {
    color: #999999;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.password-strength-container {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-strength {
    display: flex;
    gap: 4px;
    flex: 1;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: background 0.3s;
}

.strength-bar.weak {
    background: #ff6b6b;
}

.strength-bar.medium {
    background: #ffa500;
}

.strength-bar.strong {
    background: #4caf50;
}

.strength-text {
    font-size: 13px;
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

.error-message {
    color: #ff6b6b;
    font-size: 13px;
    display: none;
    animation: shake 0.3s;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
}

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

.checkbox input:checked + .checkmark {
    background: #4f46e5;
    border-color: #4f46e5;
}

.checkbox input:checked + .checkmark::after {
    display: block;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 2px solid #d0d0d0;
    border-radius: 4px;
    transition: all 0.2s;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.checkbox-label {
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-label a {
    color: #4f46e5;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.signup-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.signup-btn:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.signup-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.signup-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

.login-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #999999;
}

.login-link a {
    color: #667EEA;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-link a:hover {
    color: #4f46e5;
}

.back-link {
    color: #4f46e5;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #764ba2;
}

/* 다크모드 토글 버튼 스타일 */
.dark-mode-toggle-wrapper {
    position: fixed;
    top: 20px;
    right: 100px;
    z-index: 100;
}

.dark-mode-toggle {
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 32px;
}

.toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: #E5E7EB;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* body에 dark-mode 클래스가 있으면 초기 상태를 다크모드로 설정 (깜빡임 방지) */
html.dark-mode .toggle-track {
    background: #374151;
}

.dark-mode-toggle.dark-mode-active .toggle-track {
    background: #374151;
}

.toggle-knob {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #9CA3AF;
    transition: left 0.3s ease, background 0.3s ease;
    left: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* body에 dark-mode 클래스가 있으면 초기 상태를 다크모드로 설정 (깜빡임 방지) */
html.dark-mode .toggle-knob {
    left: calc(100% - 30px);
    background: #ffffff;
}

.dark-mode-toggle.dark-mode-active .toggle-knob {
    left: calc(100% - 30px);
    background: #ffffff;
}

.toggle-icon-dark,
.toggle-icon-light {
    position: absolute;
    font-size: 14px;
    transition: opacity 0.3s ease, color 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-icon-dark {
    left: 8px;
    color: #6B7280;
    opacity: 0;
}

.toggle-icon-dark i {
    color: inherit;
}

.toggle-icon-light {
    right: 8px;
    color: #F59E0B;
    opacity: 1;
}

.toggle-icon-light i {
    color: inherit;
}

/* body에 dark-mode 클래스가 있으면 초기 상태를 다크모드로 설정 (깜빡임 방지) */
html.dark-mode .toggle-icon-dark {
    opacity: 1;
    color: #ffffff;
}

html.dark-mode .toggle-icon-dark i {
    color: #ffffff;
}

html.dark-mode .toggle-icon-light {
    opacity: 0;
}

.dark-mode-toggle.dark-mode-active .toggle-icon-dark {
    opacity: 1;
    color: #ffffff;
}

.dark-mode-toggle.dark-mode-active .toggle-icon-dark i {
    color: #ffffff;
}

.dark-mode-toggle.dark-mode-active .toggle-icon-light {
    opacity: 0;
}

.dark-mode-toggle:hover .toggle-track {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-mode-toggle:hover {
    transform: none;
}

/* 다크모드 배경 */
html.dark-mode,
html.dark-mode body {
    background: rgb(32, 33, 37);
    color: #e2e8f0;
}

html.dark-mode .signup-card {
    background: rgb(42, 43, 48);
    color: #E5E7EB;
    border-radius: 16px;
}

html.dark-mode .welcome-title {
    color: #E5E7EB;
}

html.dark-mode .welcome-subtitle {
    color: #9CA3AF;
}

html.dark-mode .social-btn {
    background: #374151;
    border-color: #4B5563;
    color: #E5E7EB;
    border-radius: 8px;
}

/* 다크모드 - 구글 버튼 하얀색 */
html.dark-mode .social-btn.google {
    background: #ffffff !important;
    border-color: #e0e0e0 !important;
    color: #333333 !important;
}

html.dark-mode .social-btn.google:hover {
    background: #f5f5f5 !important;
    border-color: #d0d0d0 !important;
}

html.dark-mode .social-btn.google > span {
    color: #333333 !important;
}

/* 다크모드 - 구글 로고 원래 색상 유지 (하얀 배경에 맞춤) */
html.dark-mode .social-btn.google .social-icon svg {
    filter: none;
}

html.dark-mode .social-btn.kakao {
    background: #FEE500;
    border-color: #FEE500;
    color: #000000;
}

html.dark-mode .social-btn.naver {
    background: #03C75A;
    border-color: #03C75A;
    color: #ffffff;
}

html.dark-mode .social-btn.email {
    background: #FF6B35;
    border-color: #FF6B35;
    color: #ffffff;
}

html.dark-mode .form-input {
    background: #374151;
    border-color: #4B5563;
    color: #E5E7EB;
    border-radius: 8px;
}

html.dark-mode .form-label {
    color: #E5E7EB;
}

html.dark-mode .login-link {
    color: #9CA3AF;
}

html.dark-mode .login-link a {
    color: #667EEA;
}

html.dark-mode .close-btn {
    color: #9CA3AF;
}

html.dark-mode .close-btn:hover {
    color: #E5E7EB;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .signup-card {
        padding: 30px 20px;
    }
    
    .dark-mode-toggle {
        right: 70px;
    }
}

