/* 
 * dday-style.css
 * 기념일 날짜 계산기 전용 스타일
 */

/* 기본 설정 */
:root {
    --color-primary: #4E63D9;
    --color-primary-hover: #2E3C8C;
    --color-primary-dark: #1D2659;
    --color-bg: #f8f9fd;
    --color-white: #ffffff;
    --color-text: #1D2659;
    --color-text-light: #2E3C8C;
    --color-border: rgba(78, 99, 217, 0.2);
    --color-success: #10b981;
    --color-warning: #f59e0b;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* 헤더 */
.header { position: sticky; top: 0; z-index: 1000; background: var(--color-white); border-bottom: 1px solid var(--color-border); box-shadow: 0 1px 3px rgba(29, 38, 89, 0.1); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.logo-mark { background: var(--color-primary); color: #fff; padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 1.1rem; font-weight: 800; border: 2px solid var(--color-primary); box-shadow: 0 2px 8px rgba(78, 99, 217, 0.3); }
.logo-text { display: none; }
.nav { display: flex; gap: 1rem; flex: 1; justify-content: center; margin-left: 3rem; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--color-text-light); font-weight: 500; transition: color 0.2s; white-space: nowrap; font-size: 0.85rem; text-decoration: none; }
.nav a:hover { color: var(--color-primary); }
.nav-toggle { display: none; }

/* 공통 컨테이너 */
.section-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 유틸리티 */
.hidden {
    display: none !important;
}

/* 히어로 섹션 */
.hero {
    background: var(--color-primary);
    padding: 80px 0;
    text-align: center;
    color: var(--color-white);
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
}

/* 버튼 */
.btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn.primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn.primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

/* 메인 섹션 */
.main-section {
    padding: 60px 0;
}

/* 계산 카드 */
.calc-card {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.calc-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(78, 99, 217, 0.15);
}

.calc-card h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-primary-dark);
    margin-bottom: 8px;
}

.card-desc {
    font-size: 15px;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

/* 레이블 */
label {
    display: block;
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-text);
}

/* 텍스트 입력 */
input[type="text"] {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* 날짜 입력 */
input[type="date"] {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

input[type="date"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* 결과 박스 */
.result-box {
    margin-top: 24px;
    padding: 20px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
}

.result-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.result-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--color-warning);
    color: var(--color-warning);
}

/* 결과 목록 */
.result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-list li:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--color-text);
}

.result-value {
    font-weight: 800;
    color: var(--color-primary);
}

/* D-Day 위젯 */
.dday-widget {
    margin-top: 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(78, 99, 217, 0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-white);
}

.widget-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--color-white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.widget-body {
    padding: 40px 24px;
    text-align: center;
    color: var(--color-white);
}

.widget-dday {
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 16px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: -2px;
}

.widget-date {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 32px;
}

.widget-progress {
    margin-top: 24px;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 6px;
    transition: width 0.8s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
}

/* 위젯 스타일 변형 */
.dday-widget.past {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.dday-widget.today {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 8px 48px rgba(245, 158, 11, 0.6);
    }
}

/* 사용 안내 섹션 */
.info-section {
    padding: 80px 0;
    background: var(--color-white);
}

.info-section h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-primary-dark);
    text-align: center;
    margin-bottom: 48px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.info-card {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
}

.info-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}

.info-card p {
    font-size: 15px;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* 반응형 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .calc-card {
        padding: 24px;
    }

    .info-section h2 {
        font-size: 28px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}
