/* リセットとベーススタイル */
* {
    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: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 固定ヘッダー：コンパクトな点数表示 */
.score-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.score-header.hidden {
    transform: translateY(-100%);
}

.score-header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.score-header .score-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.score-header .score-value {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ヒーローセクション */
.hero {
    background: transparent;
    color: white;
    padding: 60px 20px;
    text-align: center;
}

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

.hero .subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

.hero i {
    margin-right: 10px;
}

/* メインコンテナ */
.main-container {
    min-height: 100vh;
}

main {
    padding-bottom: 60px;
}

/* ステップインジケーター */
.steps {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 0;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: white;
    color: #667eea;
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}

.step-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    font-weight: 500;
}

.step.active .step-label {
    color: white;
    font-weight: 700;
}

/* フォームコンテナ */
.form-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.form-step h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-step h2 i {
    color: #667eea;
}

/* フォームグループ */
.form-group {
    margin-bottom: 25px;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

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

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #666;
}

/* 現在のスコア表示 */
.current-score {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    margin: 25px 0;
    font-size: 1.1em;
}

.current-score strong {
    color: #667eea;
    font-size: 1.3em;
    font-weight: 700;
}

/* 調整指数セクション */
.adjustment-title {
    color: #667eea;
    margin: 25px 0 15px;
    font-size: 1.2em;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.adjustment-group {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.checkbox-group {
    margin-bottom: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.checkbox-group label:hover {
    background: rgba(102, 126, 234, 0.05);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-group .points {
    margin-left: auto;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.9em;
}

.checkbox-group .points.negative {
    background: #ffebee;
    color: #c62828;
}

/* ボタングループ */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* 結果表示 */
.result-summary {
    margin-bottom: 40px;
}

.total-score-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    margin-bottom: 20px;
}

.total-score-card .score-label {
    font-size: 1em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.total-score-card .score-value {
    font-size: 4em;
    font-weight: 700;
    margin-bottom: 15px;
}

.total-score-card .score-breakdown {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 0.95em;
}

.total-score-card .score-breakdown span {
    opacity: 0.9;
}

.result-message {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.result-message i {
    font-size: 1.5em;
}

.result-message.excellent {
    background: #e8f5e9;
    color: #2e7d32;
}

.result-message.good {
    background: #fff3e0;
    color: #e65100;
}

.result-message.fair {
    background: #fff3e0;
    color: #f57c00;
}

.result-message.poor {
    background: #ffebee;
    color: #c62828;
}

/* コントロール */
.controls {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.control-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.control-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.control-item label i {
    margin-right: 5px;
    color: #667eea;
}

/* テーブル */
.table-container {
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-scroll {
    overflow-x: auto;
}

.nursery-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.nursery-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nursery-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
}

.nursery-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.nursery-table tbody tr {
    transition: background 0.2s ease;
}

.nursery-table tbody tr:hover {
    background: #f9f9f9;
}

.col-rating {
    width: 60px;
    text-align: center;
}

.col-name {
    min-width: 200px;
}

.col-area {
    width: 100px;
}

.col-address {
    min-width: 150px;
}

.col-border {
    width: 80px;
    text-align: center;
    color: #999;
}

.col-border.has-data {
    color: #333;
    font-weight: 600;
}

.rating {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1em;
}

.rating.excellent {
    background: #e8f5e9;
    color: #2e7d32;
}

.rating.good {
    background: #fff3e0;
    color: #e65100;
}

.rating.fair {
    background: #fff3e0;
    color: #f57c00;
}

.rating.poor {
    background: #ffebee;
    color: #c62828;
}

.rating.unknown {
    background: #f5f5f5;
    color: #999;
}

.nursery-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.nursery-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.nursery-link i {
    font-size: 0.8em;
    opacity: 0.7;
}

.no-data {
    text-align: center;
    padding: 40px !important;
    color: #999;
}

.table-footer {
    background: #f9f9f9;
    padding: 15px 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

/* 凡例 */
.legend {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
}

.legend h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2em;
}

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

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

/* フッター */
.footer {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
}

.footer p {
    margin-bottom: 10px;
    font-size: 0.9em;
    opacity: 0.9;
}

.footer a {
    color: white;
    text-decoration: underline;
}

.footer a:hover {
    opacity: 0.8;
}

.footer .copyright {
    margin-top: 20px;
    opacity: 0.7;
    font-size: 0.85em;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8em;
    }
    
    .hero .subtitle {
        font-size: 1em;
    }
    
    .steps {
        padding: 0 10px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }
    
    .step-label {
        font-size: 0.75em;
    }
    
    .form-container {
        padding: 25px 20px;
    }
    
    .form-step h2 {
        font-size: 1.4em;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .total-score-card .score-value {
        font-size: 3em;
    }
    
    .total-score-card .score-breakdown {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-row {
        grid-template-columns: 1fr;
    }
    
    .nursery-table {
        font-size: 0.85em;
    }
    
    .nursery-table th,
    .nursery-table td {
        padding: 10px 8px;
    }
    
    .col-name {
        min-width: 150px;
    }
    
    .legend-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 15px;
    }
    
    .hero h1 {
        font-size: 1.5em;
    }
    
    .form-container {
        border-radius: 15px;
        padding: 20px 15px;
    }
    
    .score-header .score-value {
        font-size: 18px;
    }
    
    .table-scroll {
        -webkit-overflow-scrolling: touch;
    }
}

/* プリント用 */
@media print {
    .hero,
    .steps,
    .button-group,
    .controls,
    .footer,
    .score-header {
        display: none;
    }
    
    .form-container {
        box-shadow: none;
    }
    
    body {
        background: white;
    }
}
