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

/* コンテナ */
.shichusuimei-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* フォーム */
.shichusuimei-form-container {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shichusuimei-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.form-group .required {
    color: #e74c3c;
}

.form-group input[type="date"],
.form-group input[type="number"],
.form-group select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* 生年月日入力グループ */
.birth-date-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 120px;
}

.date-input-group input[type="number"] {
    width: 80px;
    text-align: center;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.date-input-group input[type="number"]:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.date-unit {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.time-input-group select {
    flex: 1;
    min-width: 150px;
    padding: 10px 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.time-input-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.time-label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.calculate-button {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calculate-button:hover {
    background: linear-gradient(135deg, #357abd 0%, #2c5aa0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.calculate-button:active {
    transform: translateY(0);
}

/* ローディング */
.shichusuimei-loading {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.shichusuimei-loading p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* エラー */
.shichusuimei-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    color: #c33;
}

.shichusuimei-error p {
    margin: 0;
    font-weight: 500;
}

/* 結果表示 */
.shichusuimei-result {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.shichusuimei-result h3 {
    color: #2c3e50;
    border-bottom: 3px solid #4a90e2;
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
}

/* テーブル */
.shichusuimei-result .wp-block-table {
    margin: 20px 0;
}

.shichusuimei-result .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shichusuimei-result .wp-block-table th {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shichusuimei-result .wp-block-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

.shichusuimei-result .wp-block-table tr:nth-child(even) {
    background: #f8f9fa;
}

.shichusuimei-result .wp-block-table tr:hover {
    background: #e3f2fd;
}

/* 五行バランスチャート */
.gogyo-chart-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.gogyo-chart-container canvas {
    max-width: 100%;
    height: auto;
}

.gogyo-note {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

/* 鑑定結果 */
.fortune-reading {
    margin-top: 30px;
}

.reading-section {
    background: #f8f9fa;
    border-left: 4px solid #4a90e2;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 6px 6px 0;
}

.reading-section h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
}

.reading-section p {
    margin: 0;
    line-height: 1.6;
    color: #555;
    font-size: 16px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .shichusuimei-container {
        padding: 15px;
    }
    
    .shichusuimei-form-container {
        padding: 20px;
    }
    
    .shichusuimei-result {
        padding: 20px;
    }
    
    .shichusuimei-result h3 {
        font-size: 20px;
    }
    
    .shichusuimei-result .wp-block-table th,
    .shichusuimei-result .wp-block-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .gogyo-chart-container canvas {
        max-width: 300px;
    }
    
    .calculate-button {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    /* 生年月日入力のレスポンシブ対応 */
    .birth-date-inputs {
        gap: 10px;
    }
    
    .date-input-group {
        flex: 1;
        min-width: 100px;
    }
    
    .date-input-group input[type="number"] {
        width: 70px;
    }
    
    .time-input-group {
        flex: 1;
        min-width: 150px;
    }
    
    .time-input-group select {
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .shichusuimei-result .wp-block-table {
        font-size: 12px;
    }
    
    .shichusuimei-result .wp-block-table th,
    .shichusuimei-result .wp-block-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .reading-section {
        padding: 15px;
    }
    
    .reading-section h4 {
        font-size: 18px;
    }
    
    .reading-section p {
        font-size: 14px;
    }
    
    /* 生年月日入力の小画面対応 */
    .birth-date-inputs {
        gap: 8px;
    }
    
    .date-input-group {
        gap: 4px;
        min-width: 80px;
    }
    
    .date-input-group input[type="number"] {
        width: 60px;
        padding: 8px 4px;
        font-size: 14px;
    }
    
    .date-unit {
        font-size: 14px;
    }
    
    .time-input-group {
        min-width: 120px;
        gap: 4px;
    }
    
    .time-input-group select {
        min-width: 100px;
        padding: 8px 4px;
        font-size: 14px;
    }
    
    .time-label {
        font-size: 14px;
    }
}

/* アニメーション */
.shichusuimei-result {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* フォントサイズ設定 */
.shichusuimei-container.font-small {
    font-size: 14px;
}

.shichusuimei-container.font-small .shichusuimei-result h3 {
    font-size: 20px;
}

.shichusuimei-container.font-small .reading-section h4 {
    font-size: 18px;
}

.shichusuimei-container.font-small .reading-section p {
    font-size: 14px;
}

.shichusuimei-container.font-large {
    font-size: 18px;
}

.shichusuimei-container.font-large .shichusuimei-result h3 {
    font-size: 28px;
}

.shichusuimei-container.font-large .reading-section h4 {
    font-size: 22px;
}

.shichusuimei-container.font-large .reading-section p {
    font-size: 18px;
} 