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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    padding: 32px;
}

header {
    text-align: center;
    margin-bottom: 32px;
}

h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    font-size: 14px;
}

main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

label .description {
    font-size: 12px;
    font-weight: 400;
    color: #666;
}

input[type="number"] {
    padding: 12px 16px;
    padding-right: 60px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
    width: 100%;
    background: white;
}

input[type="number"]:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

input[type="number"]:not(:placeholder-shown) {
    background-color: #fafafa;
    border-color: #333;
}

.unit {
    position: absolute;
    right: 16px;
    bottom: 12px;
    color: #999;
    font-size: 14px;
    pointer-events: none;
}

.clear-btn {
    margin-top: 12px;
    padding: 14px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-btn:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

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

footer {
    margin-top: 32px;
    text-align: center;
    color: #999;
    font-size: 12px;
}

footer .version {
    margin-top: 8px;
    text-align: right;
    font-size: 10px;
    color: #666;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .container {
        padding: 24px;
    }

    h1 {
        font-size: 24px;
    }

    input[type="number"] {
        font-size: 14px;
    }
}

/* iOS Safari対応 */
@supports (-webkit-touch-callout: none) {
    input[type="number"] {
        font-size: 16px; /* ズーム防止 */
    }
}