* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #F0FFF0 0%, #E6E6FA 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    padding: 25px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.logo {
    text-align: center;
    margin-bottom: 15px;
}

.logo h1 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.logo p {
    color: #666;
    font-size: 14px;
}

.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.input-with-unit {
    flex: 1;
    position: relative;
}

.input-with-unit input {
    width: 100%;
    padding: 10px;
    padding-right: 90px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
}

.input-with-unit input:focus {
    border-color: #4F98E4;
    box-shadow: 0 0 0 3px rgba(79, 152, 228, 0.1);
}

.calculate-btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #4F98E4 0%, #3A7BC8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 152, 228, 0.2);
}

.calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.result-container {
    margin-top: 10px;
    padding: 1px 10px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
    display: block;
}

.result-amount {
    color: #4F98E4;
    font-size: 32px;
    font-weight: 600;
    line-height: 42px;
    margin: 3px 0;
    display: none;
}

.result-amount.show {
    display: block;
    animation: fadeIn .5s ease;
}

.error-message {
    color: #ff4444;
    font-size: 16px;
    font-weight: 600;
    line-height: 42px;
    margin: 3px 0;
    display: none;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.use-tips {
    margin-top: 13px;
}

.use-tips strong {
    display: block;
    text-align: center;
}

.footer {
    margin-top: 15px;
    text-align: center;
    color: #999;
    font-size: 12px;
}

@media (max-width: 410px) {
    .container {
        padding: 20px;
    }
    
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }
}