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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: #fff;
}

.subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: #aaa;
    font-size: 1rem;
}

.highlight {
    color: #4ade80;
    font-weight: bold;
    font-size: 1.2rem;
}

.exam-section {
    margin-bottom: 25px;
}

.exam-section h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.weight {
    font-weight: normal;
    font-size: 0.85rem;
    color: #888;
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.exam-grid.single {
    grid-template-columns: 1fr;
    max-width: 200px;
}

.exam-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.exam-item label {
    font-size: 0.9rem;
    color: #bbb;
}

.exam-item input {
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.exam-item input::placeholder {
    color: #666;
}

.exam-item input:focus {
    outline: none;
    border-color: #4ade80;
    background: rgba(255, 255, 255, 0.15);
}

.exam-item input.calculated {
    background: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
    color: #4ade80;
    font-weight: bold;
}

.exam-item input.impossible {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    font-weight: bold;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border: none;
    border-radius: 10px;
    color: #000;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(74, 222, 128, 0.4);
}

.reset-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #aaa;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.reset-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.result {
    margin-top: 25px;
    padding: 20px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s ease;
}

.result.hidden {
    display: none;
}

.result.success {
    border: 2px solid #4ade80;
}

.result.warning {
    border: 2px solid #fbbf24;
}

.result.danger {
    border: 2px solid #ef4444;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#resultContent {
    line-height: 1.8;
}

#resultContent p {
    margin-bottom: 10px;
}

#resultContent .label {
    color: #aaa;
}

#resultContent .value {
    font-weight: bold;
    font-size: 1.1rem;
}

#resultContent .value.green {
    color: #4ade80;
}

#resultContent .value.yellow {
    color: #fbbf24;
}

#resultContent .value.red {
    color: #ef4444;
}

#resultContent .info {
    font-size: 0.9rem;
    color: #888;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 500px) {
    .exam-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 20px;
    }
}
