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

body {
    font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    min-height: 100vh;
}

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

.header {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1em;
}

.main-content {
    max-width: 800px;
    margin: 0 auto;
}

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

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

.section-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.input-group {
    margin-bottom: 30px;
    display: block;
}

.input-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    clear: both;
    width: 100%;
}

.input-label {
    flex: 0 0 140px;
    font-weight: 500;
    color: #34495e;
    margin-right: 15px;
}

.input-field {
    flex: 1;
    position: relative;
}

.input-with-unit {
    display: flex;
    align-items: center;
}

.input-unit {
    margin-left: 10px;
    color: #7f8c8d;
    font-size: 0.9em;
    white-space: nowrap;
}

input[type="number"] {
    width: 200px;
    padding: 10px 12px;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
}

select {
    width: 200px;
    padding: 10px 12px;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: white;
}

select:focus {
    outline: none;
    border-color: #3498db;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.layer-btn, .mounting-btn, .solder-btn, .option-btn {
    padding: 10px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    color: #34495e;
}

.layer-btn:hover, .mounting-btn:hover, .solder-btn:hover, .option-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.layer-btn.active, .mounting-btn.active, .solder-btn.active, .option-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.part-section {
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #3498db;
}

.part-section h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.total-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #e74c3c;
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: #fff5f5;
    border-radius: 8px;
    border: 2px solid #e74c3c;
}

.button-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.order-section {
    display: none;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin-top: 20px;
}

.order-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.order-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    font-size: 16px;
}

.order-input.full-width {
    grid-column: 1 / -1;
}

textarea.order-input {
    min-height: 100px;
    resize: vertical;
}

@media (max-width: 768px) {
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .input-label {
        flex: none;
        margin-bottom: 8px;
        margin-right: 0;
    }

    .input-field {
        width: 100%;
    }

    input[type="number"] {
        width: 100%;
    }

    select {
        width: 100%;
    }

    .button-group {
        justify-content: stretch;
    }

    .layer-btn, .mounting-btn, .solder-btn, .option-btn {
        flex: 1;
    }

    .order-form {
        grid-template-columns: 1fr;
    }

    .button-actions {
        flex-direction: column;
    }
}
