/* 인증 페이지 스타일 */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    position: relative;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    margin-right: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #667eea;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.auth-header h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 16px;
}

/* 폼 스타일 */
.auth-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid {
    border-color: #ff4757;
}

/* 체크박스 스타일 */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 3px;
    color: white;
    font-size: 14px;
}

/* 폼 옵션 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.link-secondary {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.link-secondary:hover {
    text-decoration: underline;
}

/* 버튼 스타일 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-full {
    width: 100%;
}

/* 구분선 */
.auth-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
    color: #999;
    font-size: 14px;
}

.auth-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.auth-divider span {
    background: white;
    padding: 0 15px;
    position: relative;
}

/* 로그인 안내 정보 */
.auth-info {
    margin-bottom: 20px;
}

.info-box {
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.info-box h4 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 18px;
    text-align: center;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.info-list li {
    padding: 10px 12px;
    margin: 8px 0;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    color: #374151;
    font-size: 14px;
    transition: all 0.3s;
}

.info-list li:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-note {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-weight: 500;
}

/* 푸터 */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.auth-footer p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 알림 메시지 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 필드 에러 */
.field-error {
    color: #ff4757;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.field-help {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

/* 비밀번호 강도 */
.password-strength {
    font-size: 12px;
    margin-top: 5px;
    padding: 4px 0;
}

.password-strength.very-weak { color: #ff4757; }
.password-strength.weak { color: #ff6b7a; }
.password-strength.medium { color: #ffa502; }
.password-strength.strong { color: #2ed573; }
.password-strength.very-strong { color: #1e90ff; }

/* 황금 키워드 미리보기 */
.golden-preview {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 350px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.golden-preview h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.golden-keywords {
    margin-bottom: 20px;
}

.golden-keyword-item {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    position: relative;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.golden-keyword-item .keyword {
    display: block;
    font-weight: bold;
    color: #333;
    font-size: 16px;
    margin-bottom: 8px;
}

.keyword-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.volume {
    color: #2d3436;
    font-weight: 600;
}

.competition.low {
    color: #00b894;
    font-weight: 500;
}

.golden-badge {
    font-size: 16px;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.preview-note {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

/* 개선된 동의 섹션 스타일 */
.agreement-section {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.agreement-section:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.agreement-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
    font-size: 14px;
}

.agreement-label input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.check-icon {
    color: white;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.agreement-label input[type="checkbox"]:checked + .custom-checkbox {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: scale(1.1);
}

.agreement-label input[type="checkbox"]:checked + .custom-checkbox .check-icon {
    opacity: 1;
    transform: scale(1);
}

.agreement-text {
    flex: 1;
    line-height: 1.5;
    color: #333;
}

.agreement-text strong {
    color: #ff4757;
    font-weight: 600;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.terms-link:hover {
    border-bottom-color: #667eea;
    color: #5a67d8;
}

.agreement-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* 반응형 체크박스 레이아웃 */
@media (min-width: 640px) {
    .agreement-section {
        padding: 16px 20px;
    }
    
    .agreement-label {
        flex-direction: row;
        align-items: center;
        margin-bottom: 12px;
    }
    
    .custom-checkbox {
        margin-right: 16px;
        margin-bottom: 0;
    }
    
    .agreement-text {
        flex: 1;
    }
    
    .agreement-buttons {
        margin-top: 8px;
        margin-left: 40px; /* 체크박스 너비 + 마진만큼 들여쓰기 */
    }
}

.btn-view-terms,
.btn-view-privacy {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-view-terms:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.btn-view-privacy:hover {
    border-color: #28a745;
    background: #28a745;
    color: white;
    transform: translateY(-1px);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: #667eea;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body h4 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-body p, .modal-body li {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal-body ul {
    margin-left: 20px;
}

/* 반응형 디자인 */
@media (max-width: 968px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-card {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .golden-preview {
        max-width: 450px;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .golden-preview {
        padding: 20px;
    }
    
    .demo-accounts {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}