/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
.header {
    text-align: center;
    color: white;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header .subtitle {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.95;
}

/* メインコンテンツ */
.main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    margin-bottom: 30px;
}

/* 入力セクション */
.input-section h2 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 1.8rem;
    text-align: center;
}

.birthday-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85rem;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn i {
    margin-right: 8px;
}

/* 結果セクション */
.result-section {
    animation: fadeIn 0.5s ease;
}

.result-section h2 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 1.8rem;
    text-align: center;
}

.result-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 5px solid #667eea;
}

.result-card h3 {
    color: #764ba2;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.result-card h3 i {
    margin-right: 10px;
}

/* 基本情報グリッド */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.info-item strong {
    display: block;
    color: #667eea;
    margin-bottom: 5px;
}

/* 四柱推命の柱 */
.pillars-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.pillar {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pillar-title {
    font-weight: 700;
    color: #764ba2;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.pillar-char {
    font-size: 2rem;
    font-weight: 700;
    margin: 10px 0;
    color: #667eea;
}

.pillar-element {
    font-size: 0.85rem;
    color: #666;
}

/* 五行バランス */
.elements-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.element-item {
    text-align: center;
    padding: 15px 5px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.element-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
}

.element-bar {
    height: 100px;
    background: #e0e0e0;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    margin: 10px auto;
    width: 30px;
}

.element-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #667eea, #764ba2);
    transition: height 0.5s ease;
}

.element-count {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* 木火土金水の色 */
.element-木 { color: #22c55e; }
.element-火 { color: #ef4444; }
.element-土 { color: #f59e0b; }
.element-金 { color: #94a3b8; }
.element-水 { color: #3b82f6; }

.element-木 .element-fill { background: linear-gradient(to top, #22c55e, #16a34a); }
.element-火 .element-fill { background: linear-gradient(to top, #ef4444, #dc2626); }
.element-土 .element-fill { background: linear-gradient(to top, #f59e0b, #d97706); }
.element-金 .element-fill { background: linear-gradient(to top, #94a3b8, #64748b); }
.element-水 .element-fill { background: linear-gradient(to top, #3b82f6, #2563eb); }

/* 性格診断・アドバイス */
.personality-content,
.advice-content,
.explanation {
    line-height: 1.8;
    color: #555;
}

.personality-content p,
.advice-content p,
.explanation p {
    margin-bottom: 15px;
}

.personality-content strong,
.advice-content strong {
    color: #764ba2;
}

/* リセットボタン */
.reset-btn {
    display: block;
    margin: 30px auto 0;
    padding: 12px 30px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.reset-btn i {
    margin-right: 8px;
}

/* フッター */
.footer {
    text-align: center;
    color: white;
    padding: 20px;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ユーティリティ */
.hidden {
    display: none;
}

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

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .main-content {
        padding: 25px 20px;
    }

    .pillars-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .elements-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }

    .element-item {
        padding: 10px 2px;
    }

    .element-name {
        font-size: 0.85rem;
    }

    .element-bar {
        height: 80px;
        width: 25px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .result-section h2,
    .input-section h2 {
        font-size: 1.4rem;
    }

    .result-card h3 {
        font-size: 1.2rem;
    }

    .element-bar {
        height: 60px;
        width: 20px;
    }
}