/**
 * Four Pillars - 四柱推命プラグイン スタイルシート
 */

/* ========================================
   基本設定
======================================== */
.fp-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Meiryo, メイリオ, sans-serif;
    color: #333;
    line-height: 1.8;
}

.fp-container * {
    box-sizing: border-box;
}

/* ========================================
   フォーム
======================================== */
.fp-form-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.fp-title {
    color: #fff;
    font-size: 28px;
    text-align: center;
    margin: 0 0 10px;
    font-weight: 700;
}

.fp-subtitle {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 0 0 30px;
    font-size: 14px;
}

.fp-form {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
}

.fp-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fp-form-group {
    flex: 1;
    min-width: 100px;
}

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

.fp-form-group select,
.fp-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 15px center;
}

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

.fp-radio-group {
    display: flex;
    gap: 20px;
}

.fp-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
}

.fp-radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.fp-form-actions {
    margin-top: 30px;
    text-align: center;
}

.fp-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 16px 60px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

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

.fp-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: fp-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* ========================================
   相性診断フォーム
======================================== */
.fp-person-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.fp-person-title {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* ========================================
   結果表示
======================================== */
.fp-result {
    margin-top: 30px;
}

.fp-result-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.fp-result-section {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

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

.fp-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px;
    padding-left: 15px;
    border-left: 4px solid #667eea;
}

/* ========================================
   基本情報
======================================== */
.fp-basic-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.fp-basic-info .fp-section-title {
    color: #fff;
    border-left-color: rgba(255, 255, 255, 0.5);
}

.fp-birth-date {
    font-size: 18px;
    margin: 0;
}

/* ========================================
   四柱表
======================================== */
.fp-pillars-table-wrapper {
    overflow-x: auto;
}

.fp-pillars-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 16px;
}

.fp-pillars-table th,
.fp-pillars-table td {
    padding: 12px 8px;
    border: 1px solid #e0e0e0;
}

.fp-pillars-table thead th {
    background: #f5f5f5;
    font-weight: 600;
    color: #555;
}

.fp-pillars-table tbody th {
    background: #fafafa;
    font-weight: 600;
    color: #666;
    width: 80px;
}

.fp-row-tenkan td,
.fp-row-chishi td {
    font-size: 24px;
    font-weight: 700;
}

.fp-nikkan {
    position: relative;
}

.fp-nikkan-label {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    background: #667eea;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 五行の色 */
.fp-gogyo-木 { background-color: #e8f5e9; color: #2e7d32; }
.fp-gogyo-火 { background-color: #ffebee; color: #c62828; }
.fp-gogyo-土 { background-color: #fff8e1; color: #f57f17; }
.fp-gogyo-金 { background-color: #f5f5f5; color: #616161; }
.fp-gogyo-水 { background-color: #e3f2fd; color: #1565c0; }

/* ========================================
   五行バランス
======================================== */
.fp-gogyo-chart {
    max-width: 500px;
    margin: 0 auto;
}

.fp-gogyo-bar-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.fp-gogyo-bar-wrapper .fp-gogyo-label {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    margin-right: 15px;
}

.fp-gogyo-bar-container {
    flex: 1;
    height: 24px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.fp-gogyo-bar {
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    transition: width 0.5s ease;
    min-width: 30px;
}

.fp-gogyo-bar.fp-gogyo-木 { background: linear-gradient(90deg, #81c784, #4caf50); }
.fp-gogyo-bar.fp-gogyo-火 { background: linear-gradient(90deg, #ef5350, #c62828); }
.fp-gogyo-bar.fp-gogyo-土 { background: linear-gradient(90deg, #ffb74d, #f57c00); }
.fp-gogyo-bar.fp-gogyo-金 { background: linear-gradient(90deg, #bdbdbd, #757575); }
.fp-gogyo-bar.fp-gogyo-水 { background: linear-gradient(90deg, #64b5f6, #1976d2); }

.fp-gogyo-value {
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}

.fp-gogyo-percent {
    width: 50px;
    text-align: right;
    font-weight: 600;
    color: #666;
    margin-left: 10px;
}

/* ========================================
   性格診断
======================================== */
.fp-personality-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
}

.fp-personality-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.fp-personality-keyword {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
}

.fp-personality-nikkan {
    color: #666;
    font-size: 14px;
}

.fp-personality-traits {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
}

.fp-personality-description {
    color: #555;
    margin: 0 0 20px;
}

.fp-personality-details {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.fp-strengths,
.fp-weaknesses {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
}

.fp-strengths {
    background: #e8f5e9;
}

.fp-weaknesses {
    background: #fff3e0;
}

.fp-strengths h4,
.fp-weaknesses h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
}

.fp-strengths h4 { color: #2e7d32; }
.fp-weaknesses h4 { color: #e65100; }

.fp-strengths ul,
.fp-weaknesses ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
}

.fp-personality-supplement {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
}

.fp-personality-supplement p {
    margin: 0 0 10px;
}

.fp-personality-supplement p:last-child {
    margin-bottom: 0;
}

/* ========================================
   運勢カード
======================================== */
.fp-fortune-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
}

.fp-fortune-card p {
    margin: 0 0 15px;
}

.fp-fortune-card p:last-child {
    margin-bottom: 0;
}

.fp-advice {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

.fp-suitable-jobs h4,
.fp-health-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 15px 0 10px;
}

.fp-job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fp-job-tag {
    background: #667eea;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
}

/* ========================================
   開運アドバイス
======================================== */
.fp-lucky-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 12px;
    padding: 25px;
}

.fp-lucky-items {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fp-lucky-item {
    flex: 1;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.fp-lucky-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.fp-lucky-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.fp-lucky-things h4,
.fp-lucky-food h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.fp-lucky-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.fp-lucky-tag {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
}

/* ========================================
   大運
======================================== */
.fp-daiun-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.fp-daiun-list {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
}

.fp-daiun-item {
    flex: 0 0 auto;
    width: 100px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.fp-daiun-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fp-daiun-item.fp-current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.fp-daiun-age {
    font-size: 12px;
    font-weight: 600;
}

.fp-daiun-year {
    font-size: 10px;
    color: #999;
    margin-bottom: 8px;
}

.fp-daiun-item.fp-current .fp-daiun-year {
    color: rgba(255, 255, 255, 0.8);
}

.fp-daiun-kanshi {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 5px;
}

.fp-daiun-item.fp-current .fp-daiun-kanshi {
    background: rgba(255, 255, 255, 0.2);
}

.fp-daiun-tsuhensei,
.fp-daiun-junishi {
    font-size: 11px;
}

.fp-current-label {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4081;
    color: #fff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
}

.fp-daiun-interpretation {
    margin-top: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.fp-daiun-interpretation h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #333;
}

/* ========================================
   年運
======================================== */
.fp-nenun-list {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
}

.fp-nenun-item {
    flex: 0 0 auto;
    width: 110px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    position: relative;
}

.fp-nenun-item.fp-current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.fp-nenun-year {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.fp-nenun-kanshi {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 5px;
}

.fp-nenun-item.fp-current .fp-nenun-kanshi {
    background: rgba(255, 255, 255, 0.2);
}

.fp-nenun-tsuhensei,
.fp-nenun-junishi {
    font-size: 11px;
    margin-bottom: 3px;
}

.fp-nenun-rating {
    margin-top: 8px;
}

.fp-stars {
    color: #ffc107;
    font-size: 12px;
}

.fp-nenun-item.fp-current .fp-stars {
    color: #fff;
}

.fp-rating-text {
    display: block;
    font-size: 10px;
    margin-top: 3px;
}

.fp-nenun-interpretation {
    margin-top: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.fp-nenun-interpretation h4 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #333;
}

.fp-nenun-details p {
    margin: 0 0 10px;
    font-size: 14px;
}

/* ========================================
   相性診断結果
======================================== */
.fp-total-score-section {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.fp-total-score-section .fp-section-title {
    color: #fff;
    border-left-color: rgba(255, 255, 255, 0.5);
}

.fp-score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.fp-score-value {
    font-size: 48px;
    font-weight: 700;
}

.fp-score-label {
    font-size: 16px;
}

.fp-score-rating {
    font-size: 24px;
    font-weight: 600;
}

.fp-detail-scores {
    max-width: 500px;
    margin: 0 auto;
}

.fp-score-bar-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.fp-score-bar-label {
    width: 120px;
    font-size: 14px;
    font-weight: 600;
}

.fp-score-bar-container {
    flex: 1;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 10px;
}

.fp-score-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.fp-score-bar-value {
    width: 50px;
    text-align: right;
    font-weight: 600;
}

.fp-nikkan-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.fp-person-nikkan {
    text-align: center;
    background: #f8f9fa;
    padding: 20px 30px;
    border-radius: 10px;
}

.fp-person-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.fp-nikkan-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
}

.fp-gogyo-value {
    display: block;
    font-size: 14px;
    color: #666;
}

.fp-relation-arrow {
    text-align: center;
}

.fp-kango-badge {
    display: block;
    background: #ff4081;
    color: #fff;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 5px;
}

.fp-relation-type {
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
}

.fp-compat-description {
    text-align: center;
    color: #555;
}

.fp-advice-list {
    margin: 0;
    padding-left: 20px;
}

.fp-advice-list li {
    margin-bottom: 10px;
}

/* ========================================
   エラーメッセージ
======================================== */
.fp-error {
    background: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ========================================
   レスポンシブ
======================================== */
/* ========================================
   年運専用ページ
======================================== */
.fp-yearly-wrapper {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.fp-nikkan-info {
    font-size: 16px;
    margin: 10px 0 0;
    opacity: 0.9;
}

.fp-nenun-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fp-nenun-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.fp-nenun-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.fp-nenun-card.fp-current {
    border: 3px solid #667eea;
}

.fp-nenun-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.fp-nenun-card.fp-current .fp-nenun-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.fp-nenun-year-label {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.fp-nenun-card.fp-current .fp-nenun-year-label {
    color: #fff;
}

.fp-current-badge {
    background: #ff4081;
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.fp-nenun-card-kanshi {
    text-align: center;
    padding: 20px;
}

.fp-nenun-card-kanshi .fp-kanshi {
    font-size: 36px;
    font-weight: 700;
    padding: 10px 25px;
    border-radius: 10px;
    display: inline-block;
}

.fp-nenun-card-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 0 20px 15px;
}

.fp-nenun-info-row {
    text-align: center;
}

.fp-nenun-info-row .fp-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 3px;
}

.fp-nenun-info-row .fp-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.fp-nenun-card-rating {
    text-align: center;
    padding: 15px;
    background: #fafafa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.fp-nenun-card-rating .fp-stars {
    font-size: 20px;
    color: #ffc107;
    display: block;
    margin-bottom: 5px;
}

.fp-nenun-card-rating .fp-rating-label {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

.fp-nenun-card-details {
    padding: 20px;
}

.fp-nenun-card-details .fp-detail-item {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.fp-nenun-card-details .fp-detail-item:last-child {
    margin-bottom: 0;
}

.fp-nenun-card-details .fp-detail-item strong {
    color: #333;
}

.fp-nenun-card-details .fp-junishi-note {
    background: #e3f2fd;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
    margin-top: 15px;
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 768px) {
    .fp-container {
        padding: 10px;
    }

    .fp-form-wrapper {
        padding: 20px;
    }

    .fp-form {
        padding: 20px;
    }

    .fp-title {
        font-size: 22px;
    }

    .fp-form-row {
        flex-direction: column;
    }

    .fp-form-group {
        width: 100%;
    }

    .fp-submit-btn {
        width: 100%;
        padding: 14px 30px;
    }

    .fp-result-section {
        padding: 20px;
    }

    .fp-section-title {
        font-size: 18px;
    }

    .fp-pillars-table {
        font-size: 14px;
    }

    .fp-row-tenkan td,
    .fp-row-chishi td {
        font-size: 20px;
    }

    .fp-personality-details {
        flex-direction: column;
    }

    .fp-lucky-items {
        flex-direction: column;
    }

    .fp-lucky-item {
        width: 100%;
    }

    .fp-daiun-item,
    .fp-nenun-item {
        width: 90px;
    }

    .fp-nikkan-comparison {
        flex-direction: column;
    }
}
