@charset "utf-8";

/* ===================================
   YUJIN 테마 - 회원가입 약관 스타일
=================================== */

/* Font Awesome 아이콘 */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/* 기본 리셋 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 메인 컨테이너 */
.terms-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.terms-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* 헤더 */
.terms-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.terms-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 30s infinite linear;
}

@keyframes float {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

.terms-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.terms-subtitle {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* 폼 */
.terms-form {
    padding: 40px;
}

/* 안내 메시지 */
.terms-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    margin-bottom: 32px;
}

.notice-icon {
    color: #0ea5e9;
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.notice-text {
    color: #0c4a6e;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* 약관 섹션 */
.terms-section {
    margin-bottom: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

/* 체크박스 스타일 */
.checkbox-wrapper {
    position: relative;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-icon {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-input:checked + .checkbox-label .checkbox-icon {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: #4f46e5;
}

.checkbox-input:checked + .checkbox-label .checkbox-icon::after {
    content: '✓';
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-input:focus + .checkbox-label .checkbox-icon {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

/* 약관 내용 */
.terms-content {
    padding: 24px;
}

.terms-text-area {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 16px;
}

.terms-info {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
}

.terms-version {
    font-weight: 500;
}

.terms-date {
    color: #9ca3af;
}

/* 개인정보 테이블 */
.privacy-table-wrapper {
    padding: 24px;
    overflow-x: auto;
}

.privacy-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.privacy-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 12px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.privacy-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #4b5563;
    vertical-align: top;
}

.privacy-table tbody tr:last-child td {
    border-bottom: none;
}

.privacy-table tbody tr:hover {
    background: #fafbfc;
}

/* 전체 동의 */
.terms-all-agree {
    padding: 24px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    margin-bottom: 32px;
}

.all-agree-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.checkbox-all-label {
    font-size: 16px;
    font-weight: 600;
    color: #065f46;
}

.checkbox-all-label .checkbox-icon {
    width: 28px;
    height: 28px;
    border-width: 3px;
}

.checkbox-input:checked + .checkbox-all-label .checkbox-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

.agree-text {
    margin-left: 8px;
}

/* 버튼 영역 */
.terms-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel {
    background: #ffffff;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-cancel:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.btn-submit {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(31, 41, 55, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #111827 0%, #030712 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.4);
}

.btn-submit:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .terms-container {
        margin: 20px auto;
        padding: 16px;
    }

    .terms-header {
        padding: 32px 24px;
    }

    .terms-title {
        font-size: 28px;
    }

    .terms-subtitle {
        font-size: 15px;
    }

    .terms-form {
        padding: 32px 24px;
    }

    .terms-notice {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .section-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .checkbox-wrapper {
        align-self: flex-end;
    }

    .terms-content,
    .privacy-table-wrapper {
        padding: 20px;
    }

    .terms-text-area {
        max-height: 200px;
        padding: 16px;
    }

    .privacy-table th,
    .privacy-table td {
        padding: 12px 8px;
        font-size: 13px;
    }

    .terms-all-agree {
        padding: 20px;
    }

    .all-agree-wrapper {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .terms-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .terms-container {
        margin: 10px auto;
        padding: 12px;
    }

    .terms-card {
        border-radius: 12px;
    }

    .terms-header {
        padding: 24px 20px;
    }

    .terms-title {
        font-size: 24px;
    }

    .terms-form {
        padding: 24px 20px;
    }

    .section-title {
        font-size: 16px;
    }

    .terms-content,
    .privacy-table-wrapper {
        padding: 16px;
    }

    .privacy-table {
        font-size: 12px;
    }

    .privacy-table th,
    .privacy-table td {
        padding: 10px 6px;
    }

    .checkbox-all-label {
        font-size: 15px;
    }

    .checkbox-all-label .checkbox-icon {
        width: 24px;
        height: 24px;
    }
}

/* 접근성 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 애니메이션 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terms-section {
    animation: slideInUp 0.6s ease-out;
}

.terms-section:nth-child(2) { animation-delay: 0.1s; }
.terms-section:nth-child(3) { animation-delay: 0.2s; }

.terms-all-agree {
    animation: slideInUp 0.6s ease-out;
    animation-delay: 0.3s;
}

/* 스크롤바 스타일 */
.terms-text-area::-webkit-scrollbar {
    width: 8px;
}

.terms-text-area::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.terms-text-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.terms-text-area::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
