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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: white;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    padding: 20px 40px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 22px;
    font-weight: bold;
}

.nav-links a {
    margin-left: 25px;
    text-decoration: none;
    color: white;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #00c9a7;
}

/* MAIN LAYOUT */
.main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 85vh;
    gap: 30px;
}

/* CARD */
.card {
    width: 400px;
    padding: 30px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* FORM */
.form-card h2 {
    margin-bottom: 20px;
}

/* INPUT GROUP (FLOATING LABEL) */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.2);
    color: white;
}

.input-group label {
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 14px;
    color: #ddd;
    transition: 0.3s;
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: -8px;
    font-size: 12px;
    color: #00c9a7;
}

/* BUTTON */
button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #00c9a7, #00b4db);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    transform: scale(1.05);
}

/* RESULT */
.result-card h2 {
    margin-bottom: 20px;
}

.result-item {
    margin: 10px 0;
    font-size: 16px;
}

.placeholder {
    opacity: 0.6;
}

/* RISK COLORS */
.high { color: #ff4d4d; }
.medium { color: #ffd166; }
.low { color: #06d6a0; }

/* CHART */
canvas {
    margin-top: 20px;
}

/* HERO SECTION */
.hero {
    text-align: center;
    padding: 40px 20px 10px 20px;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00c9a7, #00b4db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 700px;
    margin: auto;
    font-size: 16px;
    opacity: 0.8;
    line-height: 1.6;
}

/* ============================= */
/* DROPDOWN (SELECT) STYLING */
/* ============================= */

.input-group select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
    transition: 0.3s;
}

/* Dropdown hover */
.input-group select:hover {
    background: rgba(255,255,255,0.25);
}

/* Dropdown focus glow */
.input-group select:focus {
    box-shadow: 0 0 0 2px #00c9a7;
}

/* Fix dropdown arrow */
.input-group {
    position: relative;
}

.input-group::after {
    content: "▼";
    position: absolute;
    right: 12px;
    top: 14px;
    font-size: 12px;
    color: #ccc;
    pointer-events: none;
}

/* Fix option colors */
select option {
    color: black;
}

/* ============================= */
/* OPTIONAL LABEL FOR SELECT */
/* ============================= */

.select-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 5px;
    display: block;
}

/* ============================= */
/* SCROLLABLE FORM (VERY IMPORTANT) */
/* ============================= */

.form-card {
    max-height: 80vh;
    overflow-y: auto;
}

/* Scrollbar styling */
.form-card::-webkit-scrollbar {
    width: 6px;
}

.form-card::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

/* ============================= */
/* BETTER INPUT CONSISTENCY */
/* ============================= */

.input-group input,
.input-group select {
    margin-bottom: 10px;
}

/* ============================= */
/* SMOOTH TRANSITIONS */
/* ============================= */

.input-group input,
.input-group select {
    transition: all 0.3s ease;
}