@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0a1172;
    --primary-light: #15229e;
    --bg-body: #f0f4f8;
    --bg-card: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --shadow: 0 10px 40px rgba(10, 17, 114, 0.05), 0 2px 10px rgba(10, 17, 114, 0.02);
    --radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    background-image: radial-gradient(circle at 50% 0%, #eef2ff 0%, #f0f4f8 100%);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 80px;
}

/* --- NAVBAR (Glass Effect) --- */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    height: 80px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
}

.navbar {
    width: 100%; max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 24px;
}

.logo-container { display: flex; flex-direction: column; }

.logo {
    color: var(--primary); 
    font-size: 1.6rem; 
    font-weight: 800;
    text-decoration: none; 
    letter-spacing: -0.5px;
}

.tagline { 
    color: var(--text-muted); 
    font-size: 0.7rem; 
    letter-spacing: 1px; 
    text-transform: uppercase; 
    font-weight: 500;
}

/* Hamburger & Menu */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 5px; }
.hamburger span { display: block; width: 25px; height: 3px; background: var(--primary); margin: 5px 0; transition: 0.3s; border-radius: 3px;}

.nav-menu { display: flex; gap: 30px; list-style: none; }
.nav-menu a {
    color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: 0.3s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); font-weight: 600; }

/* --- MAIN CONTAINER --- */
.container { width: 100%; max-width: 900px; margin: 0 auto; padding: 20px; flex: 1; }

.card {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

.page-header { text-align: center; margin-bottom: 35px; }
.page-header h1 { font-size: 2.2rem; color: var(--primary); font-weight: 700; margin-bottom: 8px; letter-spacing: -1px; }
.page-header p { color: var(--text-muted); font-size: 1rem; }

/* --- OPTION CARDS --- */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.option-card {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.option-card:hover { transform: translateY(-3px); background: #fff; }

.option-card.active {
    border-color: var(--primary);
    background-color: #f0f3ff;
    box-shadow: 0 8px 20px rgba(10, 17, 114, 0.08);
}

.option-title { font-weight: 700; color: var(--text-main); font-size: 1.1rem; margin-bottom: 5px; }
.option-desc { font-size: 0.9rem; color: var(--text-muted); }

/* --- FORMS & TABLES --- */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.4);
}

table { width: 100%; border-collapse: collapse; min-width: 500px; }
thead { background: rgba(255,255,255,0.6); border-bottom: 1px solid var(--border); }
th { padding: 18px; text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 15px 18px; border-bottom: 1px solid rgba(0,0,0,0.03); vertical-align: middle; }

input[type="number"] {
    width: 100%; padding: 14px 16px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    font-family: inherit; font-size: 1rem;
    background: rgba(255,255,255,0.8);
    transition: 0.2s; outline: none;
}
input[type="number"]:focus { 
    border-color: var(--primary); 
    background: #fff; 
    box-shadow: 0 0 0 4px rgba(10, 17, 114, 0.1); 
}

/* --- BUTTONS --- */
.btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    padding: 16px 28px;
    border: none; border-radius: 14px;
    font-weight: 600; cursor: pointer;
    font-size: 1rem; transition: all 0.2s;
    min-width: 140px; width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

.btn-primary { 
    background: var(--primary); 
    color: white; 
    box-shadow: 0 8px 20px rgba(10, 17, 114, 0.2); 
}
.btn-primary:active { transform: scale(0.98); }

.btn-secondary { background: #eef2ff; color: var(--primary); }
.btn-secondary:hover { background: #e0e7ff; }

/* --- RESULTS --- */
.result-box {
    margin-top: 40px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
    animation: slideUp 0.4s ease-out;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.hidden { display: none; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 20px; }
.stat-item h3 { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.stat-item p { font-size: 2.5rem; font-weight: 800; color: var(--text-main); line-height: 1; }
.status-pass { color: var(--success); font-weight: 800; font-size: 1.5rem; }
.status-fail { color: var(--danger); font-weight: 800; font-size: 1.5rem; }

/* --- FOOTER & ADS --- */
.ad-container { width: 100%; height: 100px; background: rgba(0,0,0,0.03); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 0.85rem; margin: 30px 0; border: 1px dashed #d1d5db; }
footer { text-align: center; padding: 40px; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid rgba(0,0,0,0.05); margin-top: auto; }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-menu {
        display: none; /* Add JS toggle for mobile menu if needed, typically hidden for clean design or toggle logic */
        position: absolute; top: 80px; left: 0; width: 100%; 
        background: white; flex-direction: column; padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    .hamburger { display: block; }
    
    .container { padding: 15px; }
    .card { padding: 25px 20px; }
    
    /* Mobile Tables */
    table { min-width: 100%; }
    th, td { padding: 12px 8px; font-size: 0.9rem; }
    
    /* Mobile Fix for Buttons (Requested) */
    .btn-row { flex-direction: column-reverse; gap: 12px; }
    .btn { width: 100%; padding: 18px; font-size: 1.1rem; }
    
    .options-grid { grid-template-columns: 1fr; }
    .stats-grid { gap: 15px; }
}