/* ═══════════════════════════════════════════════════════════════════════════ */
/* Lucky Phone Color - 통합 최적화 CSS */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────────── */
/* 1. 기본 스타일 & 변수 */
/* ──────────────────────────────────────────────────────────────────────────── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f9fafb;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(102, 126, 234, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: white;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 2. 애니메이션 */
/* ──────────────────────────────────────────────────────────────────────────── */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(200px); }
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 3. 히어로 섹션 (index.html) */
/* ──────────────────────────────────────────────────────────────────────────── */

.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    left: -100px;
    animation: wave 10s linear infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -50px;
    right: -50px;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
    max-width: 800px;
    padding: 40px;
}

.emoji {
    font-size: 80px;
    display: block;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.hero h1 {
    font-size: 60px;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero .subtitle {
    font-size: 22px;
    margin-bottom: 30px;
    opacity: 0.95;
    font-weight: 300;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 4. 버튼 & CTA */
/* ──────────────────────────────────────────────────────────────────────────── */

.cta-button, .btn, .submit-btn {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover, .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-button-white {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 16px 48px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.cta-button-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 5. 섹션 공통 스타일 */
/* ──────────────────────────────────────────────────────────────────────────── */

section {
    padding: 80px 40px;
}

section h2 {
    font-size: 40px;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 800;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 6. 기획의도 섹션 */
/* ──────────────────────────────────────────────────────────────────────────── */

.intention {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.intention-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.intention-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s;
}

.intention-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.intention-card .icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.intention-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary);
    font-weight: 700;
}

.intention-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 7. 프로세스 섹션 */
/* ──────────────────────────────────────────────────────────────────────────── */

.process {
    background: white;
}

.process-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.process-step {
    text-align: center;
    position: relative;
}

.process-step::after {
    content: '→';
    position: absolute;
    right: -35px;
    top: 30px;
    font-size: 30px;
    color: var(--primary);
}

.process-step:last-child::after {
    display: none;
}

.process-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    margin: 0 auto 20px;
}

.process-step h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 700;
}

.process-step p {
    color: var(--text-light);
    font-size: 14px;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 8. 특징 섹션 */
/* ──────────────────────────────────────────────────────────────────────────── */

.features {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(240, 147, 251, 0.05) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-item {
    display: flex;
    gap: 20px;
}

.feature-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.feature-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 700;
}

.feature-content p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 9. 후기 섹션 */
/* ──────────────────────────────────────────────────────────────────────────── */

.testimonial {
    background: white;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.testimonial-card .stars {
    font-size: 20px;
    margin-bottom: 15px;
}

.testimonial-card p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.95;
    line-height: 1.8;
}

.testimonial-card .author {
    font-weight: 700;
    font-size: 15px;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 10. CTA 섹션 */
/* ──────────────────────────────────────────────────────────────────────────── */

.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 100px 40px;
}

.cta-section h2 {
    color: white;
    font-size: 45px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 11. 푸터 */
/* ──────────────────────────────────────────────────────────────────────────── */

footer {
    background: #1a1a1a;
    color: white;
    text-align: center;
    padding: 30px;
    font-size: 14px;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 12. 분석 페이지 (analyze.html) */
/* ──────────────────────────────────────────────────────────────────────────── */

.analyze-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 60px 20px;
}

.analyze-header {
    text-align: center;
    margin-bottom: 50px;
}

.analyze-header h1 {
    font-size: 42px;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 800;
}

.analyze-header p {
    font-size: 16px;
    color: var(--text-light);
}

/* 폼 래퍼 */
.form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

/* 폼 섹션 */
.form-section {
    margin-bottom: 40px;
}

.form-section h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* 폼 행 & 그룹 */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* 시간 그리드 */
.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.time-option {
    position: relative;
}

.time-option input[type="radio"] {
    display: none;
}

.time-option label {
    display: block;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    font-weight: 600;
}

.time-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: var(--primary);
}

.time-option label:hover {
    border-color: var(--primary);
}

/* 지역 정보 */
.region-info {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 12px;
    color: var(--text-light);
}

.region-info strong {
    color: var(--primary);
}

/* 제출 버튼 */
.submit-btn {
    width: 100% !important;
    padding: 18px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* 결과 래퍼 */
.result-wrapper {
    max-width: 900px;
    margin: 50px auto;
    display: none;
}

.result-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

/* 사주 표시 */
.saju-display {
    text-align: center;
    margin-bottom: 40px;
}

.saju-title {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.saju-text {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 8px;
    font-family: Arial, sans-serif;
}

/* 차트 컨테이너 */
.chart-container {
    max-width: 400px;
    margin: 40px auto;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.chart-title {
    text-align: center;
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 스마트폰 그리드 */
.phone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.phone-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.phone-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.phone-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.phone-card h3 {
    font-size: 16px;
    padding: 15px;
    margin: 0;
    color: var(--text-dark);
    font-weight: 700;
}

.phone-card p {
    padding: 0 15px;
    margin: 0;
    color: var(--text-light);
    font-size: 13px;
}

.phone-card .btn {
    display: block;
    margin: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
}

.phone-card .btn:hover {
    color: white;
    text-decoration: none;
}

/* 전화 섹션 */
.phone-section {
    margin-top: 40px;
}

.phone-section h2 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 800;
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 13. 테이블 (관리자 페이지) */
/* ──────────────────────────────────────────────────────────────────────────── */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: var(--bg-light);
}

/* ──────────────────────────────────────────────────────────────────────────── */
/* 14. 반응형 디자인 */
/* ──────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    section {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 40px;
    }
    
    .hero .subtitle {
        font-size: 16px;
    }
    
    .emoji {
        font-size: 60px;
    }
    
    section h2 {
        font-size: 28px;
    }
    
    .form-wrapper {
        padding: 30px;
    }
    
    .phone-grid {
        grid-template-columns: 1fr;
    }
    
    .analyze-header h1 {
        font-size: 32px;
    }
    
    .saju-text {
        font-size: 36px;
    }
    
    .time-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-step::after {
        display: none;
    }
    
    .process-container {
        gap: 50px;
    }
    
    .cta-section {
        padding: 60px 20px;
    }
    
    .cta-section h2 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 30px;
    }
    
    .emoji {
        font-size: 50px;
    }
    
    .form-wrapper {
        padding: 20px;
    }
    
    .time-grid {
        grid-template-columns: 1fr;
    }
}