* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    padding: 30px 25px;
    width: 100%;
    max-width: 420px;
    transition: all 0.2s;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: -0.5px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 6px;
}

input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.15s, box-shadow 0.15s;
    background-color: #f9fafc;
}

input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49,130,206,0.1);
    background-color: white;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.5;
}

button {
    width: 100%;
    background-color: #3182ce;
    color: white;
    border: none;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.1s;
    margin-top: 10px;
}

button:hover {
    background-color: #2c5282;
}

button:active {
    transform: scale(0.98);
}

.result {
    margin-top: 25px;
    padding: 18px 15px;
    background-color: #f0f4f8;
    border-radius: 10px;
    border-left: 5px solid #3182ce;
    font-size: 1.1rem;
    word-break: break-word;
    min-height: 70px;
    transition: all 0.2s;
}

.result .error {
    color: #c53030;
    font-weight: 500;
}

.result .grade {
    color: #2d3748;
    font-weight: 500;
    line-height: 1.6;
}

.result .grade span {
    font-weight: 600;
    color: #2b6cb0;
}