/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* メインコンテンツ */
main {
    display: grid;
    gap: 40px;
}

section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* 使い方セクション */
.intro ol {
    margin-left: 20px;
}

.intro li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* テストグリッド */
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.test-card {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
}

.test-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.test-card.coming-soon {
    opacity: 0.6;
}

.test-card.coming-soon:hover {
    transform: none;
    border-color: #e9ecef;
    box-shadow: none;
}

.test-card p {
    margin-bottom: 20px;
    color: #6c757d;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn.disabled {
    background: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
}

/* aboutセクション */
.about p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* フッター */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    section {
        padding: 20px;
    }
    
    .test-grid {
        grid-template-columns: 1fr;
    }
}

/* 検定ページ用のスタイル */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
}

.result-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.result-box.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.result-box.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.result-item {
    margin-bottom: 10px;
}

.result-item strong {
    display: inline-block;
    min-width: 120px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #667eea;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* t検定ページ用の追加スタイル */
.results-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.numeric-results {
    min-height: 400px;
}

.chart-container {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.chart-container h3 {
    margin-bottom: 15px;
    text-align: center;
    color: #2c3e50;
}

#tDistributionChart {
    max-height: 400px;
    width: 100% !important;
    height: auto !important;
}

.chart-explanation {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chart-explanation ul {
    margin: 0;
    padding-left: 20px;
}

.chart-explanation li {
    margin-bottom: 5px;
}

/* レスポンシブデザイン（スマホ対応） */
@media (max-width: 768px) {
    .results-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-container {
        order: 2;
    }
    
    .numeric-results {
        order: 1;
        min-height: auto;
    }
}
