/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ⚡ APC System - Pages Stylesheet
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 📁 파일명: /www/_acc/css/pages.css
 * 📌 버전: v1.6
 * 📅 작성일: 2025-12-25
 * 📝 설명: Legal pages (Terms, Privacy) 스타일 추가
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 페이지 헤더 (그라데이션 - 기존 APC 스타일)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.page-header {
    background: linear-gradient(135deg, #f59e0b 0%, #FF6B35 50%, #E91E63 100%);
    color: white;
    padding: 50px 20px 30px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.page-header p {
    margin: 0;
    opacity: 0.95;
    font-size: 1.1rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ★★★ [v1.4] 라운드 필 탭 메뉴 - 310.png 스타일 (바나나톤)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.tab-nav-wrapper {
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    background: var(--bg);
}

.tab-nav {
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--banana-border);
    border-radius: 50px;
    padding: 6px;
    gap: 4px;
}

.tab-btn {
    padding: 12px 28px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--banana-medium);
    border: 1px solid var(--banana-border);
    color: var(--banana-dark);
    font-weight: 600;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ★★★ [v1.3] 컨텐츠 영역
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.page-content {
    background: var(--bg);
    min-height: 60vh;
    padding: 40px 20px 60px;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 탭 컨텐츠 전환 */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ★★★ [v1.2] 가격 카드 - 바나나톤 외곽선
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px 28px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid var(--banana-border);
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15);
}

.pricing-card.featured {
    border-color: #22c55e;
}

/* Most Popular 배지 */
.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #22c55e;
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* 카드 헤더 */
.pricing-card h3 {
    color: var(--text);
    font-size: 1.4rem;
    margin: 0 0 6px 0;
    font-weight: 600;
}

.pricing-card .card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 24px 0;
}

/* 가격 */
.price-row {
    margin-bottom: 8px;
}

.price-original {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: line-through;
    margin-right: 10px;
}

.price-current {
    color: var(--text);
    font-size: 2.8rem;
    font-weight: 700;
}

.price-period {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.price-billing {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.price-save {
    color: #22c55e;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* 구독 버튼 (Buy Now와 동일) */
.btn-subscribe {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f59e0b 0%, #FF6B35 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 28px;
}

.btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

/* 기능 리스트 */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.feature-list li:first-child {
    border-top: none;
}

.feature-list .check-icon {
    color: #22c55e;
    font-size: 0.9rem;
}

.feature-list .x-icon {
    color: #ef4444;
    font-size: 0.9rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 크레딧 모델 카드 (Generation Credits 탭)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.credit-models {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.credit-model-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--banana-border);
}

.credit-model-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15);
}

.credit-model-card.featured {
    border-color: #f59e0b;
}

.model-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.credit-model-card h3 {
    color: var(--text);
    font-size: 1.3rem;
    margin: 0 0 20px 0;
}

.model-credits {
    margin-bottom: 16px;
}

.credits-num {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #FF6B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.credits-label {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-left: 6px;
}

.model-resolution {
    display: inline-block;
    background: var(--banana-medium);
    color: var(--banana-text);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 크레딧 패키지 (Pay as you go 탭)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.credit-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.package-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid var(--banana-border);
}

.package-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15);
}

.package-card.popular {
    border-color: #22c55e;
}

.package-card h3 {
    color: var(--text);
    font-size: 1.3rem;
    margin: 0 0 20px 0;
}

.package-credits {
    margin-bottom: 16px;
}

.package-price {
    color: var(--text);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.package-price .currency {
    font-size: 1.2rem;
    vertical-align: top;
}

.package-per-credit {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.btn-buy {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f59e0b 0%, #FF6B35 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * FAQ 섹션
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.faq-item {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--banana-border);
}

.faq-item h4 {
    color: var(--text);
    font-size: 1.05rem;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-item h4::before {
    content: '🍌';
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Creations 페이지
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.creations-container {
    padding: 10px 0;
}

.creations-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.loading-spinner-large {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.creations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.creation-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.creation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--banana-border);
}

.creation-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--banana-light);
    overflow: hidden;
}

.creation-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.creation-card:hover .creation-image-wrapper img {
    transform: scale(1.05);
}

.creation-info {
    padding: 16px;
}

.creation-prompt {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.creation-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.creation-actions {
    display: flex;
    border-top: 1px solid var(--border);
}

.creation-action-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.creation-action-btn:hover {
    background: var(--banana-light);
    color: var(--banana-dark);
}

.creation-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.creation-action-btn + .creation-action-btn {
    border-left: 1px solid var(--border);
}

/* Empty / Login Required */
.creations-empty,
.creations-login-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-icon,
.login-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.creations-empty h2,
.creations-login-required h2 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.creations-empty p,
.creations-login-required p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #f59e0b 0%, #FF6B35 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 반응형
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 768px) {
    .page-header {
        padding: 40px 20px 20px;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .tab-nav-wrapper {
        padding: 20px 10px;
    }
    
    .tab-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: auto;
        max-width: calc(100vw - 40px);
    }
    
    .tab-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .page-content {
        padding: 30px 15px 50px;
    }
    
    .pricing-cards,
    .credit-models,
    .credit-packages {
        grid-template-columns: 1fr;
    }
    
    .creations-grid {
        grid-template-columns: 1fr;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 다크모드 대응
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
[data-theme="dark"] .tab-nav {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .tab-btn.active {
    background: var(--banana-medium);
    border-color: var(--banana-border);
    color: var(--banana-text);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Legal Pages (Terms, Privacy)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.legal-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--banana-primary);
}

.legal-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 12px 0;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.legal-section ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.legal-section ul li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--banana-primary);
    font-weight: bold;
}

.legal-section ul li strong {
    color: var(--text-primary);
}

/* Warning Section (Prohibited Content) */
.legal-section.warning-section {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.legal-section.warning-section h2 {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

.legal-section.warning-section ul li::before {
    content: "";
}

.warning-text {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 16px;
}

/* Dark Mode for Legal Pages */
[data-theme="dark"] .legal-section {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .legal-section.warning-section {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .warning-text {
    background: rgba(239, 68, 68, 0.2);
}