* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

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

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

.calculator {
    padding: 30px;
}

.section {
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 15px;
    border: 3px solid;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* 基本情報 - グレー */
.section.basic-info {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-color: #6c757d;
}

.section.basic-info .section-title {
    color: #495057;
}

/* 宿泊 - 青 */
.section.hotel {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
}

.section.hotel .section-title {
    color: #1565c0;
}

.section.hotel .subtotal span:last-child {
    color: #1976d2;
}

/* 食事 - 緑 */
.section.meal {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #4caf50;
}

.section.meal .section-title {
    color: #2e7d32;
}

.section.meal .subtotal span:last-child {
    color: #388e3c;
}

/* 交通 - オレンジ */
.section.transport {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ff9800;
}

.section.transport .section-title {
    color: #e65100;
}

.section.transport .subtotal span:last-child {
    color: #f57c00;
}

/* 夜遊び - ピンク/赤 */
.section.nightlife {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    border-color: #e91e63;
    box-shadow: 0 6px 12px rgba(233, 30, 99, 0.3);
}

.section.nightlife .section-title {
    color: #c2185b;
    font-size: 1.5em;
}

.section.nightlife .subtotal span:last-child {
    color: #d81b60;
}

/* 観光 - 紫 */
.section.tourism {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-color: #9c27b0;
}

.section.tourism .section-title {
    color: #6a1b9a;
}

.section.tourism .subtotal span:last-child {
    color: #7b1fa2;
}

/* その他 - シアン */
.section.other {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    border-color: #00bcd4;
}

.section.other .section-title {
    color: #00838f;
}

.section.other .subtotal span:last-child {
    color: #0097a7;
}

.section-title {
    font-size: 1.4em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

.input-group {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 150px 80px;
    gap: 10px;
    align-items: center;
}

.input-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.input-group input,
.input-group select {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

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

.input-group select {
    cursor: pointer;
    grid-column: 2 / 4;
}

.unit {
    color: #6c757d;
    font-size: 0.9em;
    text-align: center;
    font-weight: 600;
}

.subtotal {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.15em;
    color: #333;
}

.subtotal span:first-child {
    color: #495057;
}

.total-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 30px;
    color: white;
}

.total-section h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.total-display {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.total-item:last-child {
    border-bottom: none;
}

.total-item.per-day {
    margin-top: 15px;
    padding-top: 25px;
    border-top: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 0.95em;
    opacity: 0.95;
}

.total-label {
    font-size: 1.2em;
    font-weight: 600;
}

.total-value {
    font-size: 1.8em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.total-item.per-day .total-value {
    font-size: 1.4em;
}

footer {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    color: #6c757d;
    line-height: 1.8;
}

footer p {
    margin: 10px 0;
}

footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 0.95em;
    }

    .calculator {
        padding: 20px 15px;
    }

    .section {
        padding: 20px 15px;
    }

    .section-title {
        font-size: 1.2em;
    }

    .input-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .input-group select {
        grid-column: 1;
    }

    .input-group label {
        font-size: 0.9em;
    }

    .total-section h2 {
        font-size: 1.5em;
    }

    .total-label {
        font-size: 1em;
    }

    .total-value {
        font-size: 1.4em;
    }

    .total-item.per-day .total-value {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.3em;
    }

    .subtitle {
        font-size: 0.85em;
    }

    .total-display {
        padding: 20px;
    }

    .total-value {
        font-size: 1.2em;
    }
}