/* Birthday Calculator Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.subtitle {
    text-align: center;
    margin-bottom: 40px;
    color: #666;
    font-size: 1.2em;
}

/* セクション共通スタイル */
.calculator-section,
.result-section,
.feature-section,
.usage-section,
.ad-section {
    background: white;
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* ===== セクションタイトル ===== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== 入力セクション ===== */
.input-container {
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.input-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
}

.date-inputs {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.date-input-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-input {
    width: 80px;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    background: white;
}

.date-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-input:hover {
    border-color: #cbd5e1;
}

.date-unit {
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

/* ===== 今日の日付 ===== */
.today-info {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #7dd3fc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.today-label {
    font-weight: 600;
    color: #0369a1;
    margin-right: 0.5rem;
}

.today-date {
    font-weight: 700;
    color: #0c4a6e;
    font-size: 1.125rem;
}

/* ===== ボタンスタイル ===== */
.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

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

/* ===== 結果セクション ===== */
.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 12px 12px 0 0;
}

.age-card::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.birthday-card::before {
    background: linear-gradient(90deg, #ec4899, #be185d);
}

.stats-card::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.result-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.result-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.result-detail {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* ===== 統計表示 ===== */
.result-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

/* ===== 詳細情報 ===== */
.detail-info {
    margin-top: 2rem;
}

.info-card {
    background: linear-gradient(135deg, #fefce8, #fef3c7);
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 2rem;
}

.info-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #fbbf24;
}

.info-label {
    font-weight: 600;
    color: #92400e;
}

.info-value {
    font-weight: 700;
    color: #1f2937;
}

/* ===== 特徴カード ===== */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feature-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.feature-content p {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ===== 使い方カード ===== */
.usage-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.usage-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.usage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.usage-step {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.usage-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.usage-content p {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ===== アニメーション ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section {
    animation: fadeIn 0.5s ease-out;
}

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

.result-value {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== レスポンシブデザイン ===== */
@media (max-width: 768px) {
    .subtitle {
        font-size: 1rem;
    }
    
    .calculator-section,
    .result-section,
    .feature-section,
    .usage-section,
    .ad-section {
        padding: 20px;
    }
    
    .date-inputs {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .date-input-item {
        justify-content: center;
    }
    
    .date-input {
        width: 100px;
        font-size: 1rem;
    }
    
    .result-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .result-card {
        padding: 1.5rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .result-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .feature-cards,
    .usage-cards {
        grid-template-columns: 1fr;
    }
    
    .feature-card,
    .usage-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .result-icon {
        font-size: 2rem;
    }
    
    .feature-card,
    .usage-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
}