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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 24px 16px;
    color: #2d3748;
    line-height: 1.6;
}

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

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 32px 24px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

section {
    padding: 32px 24px;
    border-bottom: 1px solid #e2e8f0;
}

section:last-of-type {
    border-bottom: none;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a202c;
}

.note {
    font-size: 14px;
    color: #718096;
    margin-bottom: 16px;
}

.level-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.level-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    flex-wrap: wrap;
}

.level-label {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    min-width: 60px;
}

.level-name-input {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 12px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    min-width: 80px;
    text-align: center;
    transition: border-color 0.2s;
}

.level-name-input:focus {
    outline: none;
    border-color: #667eea;
}

.offset-input {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 12px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    width: 100px;
    transition: border-color 0.2s;
}

.offset-input:focus {
    outline: none;
    border-color: #667eea;
}

.level-item span {
    font-size: 16px;
    color: #4a5568;
}

.input-controls {
    margin-top: 8px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 16px;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    transition: all 0.2s;
}

.radio-label:hover {
    background: #edf2f7;
}

.radio-label:has(input[type="radio"]:checked) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.input-row input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.value-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    transition: border-color 0.2s;
}

.value-input:focus {
    outline: none;
    border-color: #667eea;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.result-label {
    font-size: 18px;
    font-weight: 600;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.examples {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.example-item {
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.example-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2d3748;
}

.example-item ul {
    list-style: none;
    padding-left: 0;
}

.example-item li {
    padding: 6px 0;
    color: #4a5568;
    font-size: 15px;
}

.example-item li::before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: 0;
}

.disclaimer-section {
    background: #fff5f5;
    border-left: 4px solid #fc8181;
}

.disclaimer-section p {
    color: #742a2a;
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    body {
        padding: 16px 8px;
    }

    header h1 {
        font-size: 24px;
    }

    section {
        padding: 24px 16px;
    }

    .level-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .value-input {
        width: 100%;
    }

    .result-item {
        padding: 16px;
    }

    .result-label {
        font-size: 16px;
    }

    .result-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 24px 16px;
    }

    header h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    .sign-btn {
        padding: 8px 16px;
        font-size: 16px;
    }
}
