:root {
    --bg-color: #f4f4f5;
    --card-bg: #ffffff;
    --text-main: #18181b;
    --text-muted: #71717a;
    --accent: #000000;
    /* Hitam pekat untuk kesan bold */
    --accent-hover: #27272a;
    --border: #e4e4e7;
    --focus-ring: rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.copyright {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.container {
    width: 100%;
    max-width: 450px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    /* Bayangan halus modern */
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.3s ease;
}

header {
    margin-bottom: 2rem;
}

.icon-wrapper {
    background: var(--bg-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.animate-icon {
    animation: float 3s ease-in-out infinite;
}

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Grid Layout untuk Input */
.input-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 kolom */
    gap: 12px;
    margin-bottom: 2rem;
}

/* Agar 2 input terakhir ada di tengah (jika 5 semester) */
.input-group:nth-last-child(2):first-child,
.input-group:nth-last-child(2):first-child~.input-group {
    grid-column: span 1;
}

/* Trik CSS Grid agar baris kedua rapi */
.input-group:nth-child(4),
.input-group:nth-child(5) {
    grid-column: span 1;
    /* Bisa diatur span 1.5 jika ingin full width */
}

/* Responsive grid fix for 5 items centered usually requires flex, but let's keep grid simple */
.input-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.input-group {
    width: 30%;
    /* Agar muat 3 per baris */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.grade-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
}

.grade-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-ring);
    transform: translateY(-2px);
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.btn {
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Efek Bouncy */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.95);
    /* Efek ditekan */
}

.btn.primary {
    background: var(--accent);
    color: white;
    flex: 2;
}

.btn.primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn.secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
    flex: 1;
}

.btn.secondary:hover {
    background: var(--bg-color);
    border-color: var(--text-main);
}

/* Result Area */
.result-area {
    background: var(--text-main);
    color: white;
    padding: 1.5rem;
    border-radius: 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: none;
    /* Hidden by default */
}

.result-area.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.result-area .label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-area h2 {
    font-size: 3rem;
    margin: 5px 0;
    letter-spacing: -2px;
}

/* Animation Keyframes */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}