/* ===== リセット・基本設定 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: white;
    min-height: 100vh;
    padding: 20px;
}

/* ===== レイアウト ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

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

.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

/* ===== セクション ===== */
.section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 3px solid #4facfe;
    padding-bottom: 10px;
}

.section h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.2em;
}

/* ===== フォーム要素 ===== */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    min-width: 18px;
    min-height: 18px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    margin-bottom: 0;
}

/* モバイル端末でのチェックボックス調整 */
@media (max-width: 768px) {
    .checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .checkbox-group input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
        transform: scale(1.3);
        align-self: flex-start;
    }
    
    .checkbox-group label {
        line-height: 1.4;
        width: 100%;
        padding-left: 0;
    }
    
    .checkbox-group small {
        width: 100%;
        margin-top: 5px;
        display: block;
        color: #666;
        font-size: 0.9em;
        line-height: 1.3;
    }
}

input[type="number"]::placeholder {
    color: #999;
    font-style: italic;
}

/* ===== ボタン ===== */
.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

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

/* ===== タブ ===== */
.tab-container {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
}

.tab-button {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #718096;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: #4facfe;
    border-bottom: 3px solid #4facfe;
}

.tab-content {
    display: none;
    padding-top: 20px;
}

.tab-content.active {
    display: block;
}

/* ===== 結果表示 ===== */
.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.result-item {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #4facfe;
}

.result-item h4 {
    color: #2d3748;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.result-item .value {
    font-size: 1.5em;
    font-weight: bold;
    color: #1a202c;
}

.highlight {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-left-color: #38a169;
}

.highlight h4 {
    color: rgba(255, 255, 255, 0.9);
}

.highlight .value {
    color: white;
}

/* ===== 注意書き ===== */
.note {
    background: #fef5e7;
    border: 1px solid #f6ad55;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.9em;
    color: #744210;
}

.error {
    background: #fed7d7;
    border: 1px solid #f56565;
    color: #742a2a;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== その他 ===== */
a {
    color: #4facfe;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    margin: 10px 0;
}

li {
    margin: 5px 0;
}