* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(145deg, #000000 0%, #0d0d0d 50%, #111111 100%);
    color: #fff;
    min-height: 100vh;
}

/* Ensure inputs and buttons use the same font */
input, button, select, textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-spacer {
    width: 40px;
}

.logo {
    font-size: 26px; /* Increased from 20px */
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hamburger Menu Button */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.menu-toggle:hover span {
    background-color: #888;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(180deg, #0a0a0a 0%, #111 100%);
    z-index: 1000;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.side-menu.open {
    right: 0;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #888;
}

.side-menu ul {
    list-style: none;
    padding: 12px 0;
}

.side-menu li a {
    display: block;
    padding: 16px 24px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: background-color 0.2s;
}

.side-menu li a:hover {
    background-color: #1a1a1a;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
main {
    padding: 48px 24px;
    max-width: 800px; /* Increased from 480px */
    margin: 0 auto;
    width: 100%;
}

/* Limit width for text and forms to keep them readable */
.page:not(#home) {
    max-width: 480px;
    margin: 0 auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 36px;
    letter-spacing: -0.5px;
    text-align: center;
    color: #fff;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: #444;
}

.form-group input:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.form-group input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.input-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
}

.hint-icon {
    font-size: 14px;
}

.input-hint strong {
    color: #bbb;
    font-weight: 600;
}

/* Toggle Buttons */
.toggle-group {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-btn {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    color: #999;
    background: rgba(255, 255, 255, 0.05);
}

.toggle-btn.active {
    background: #fff;
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Primary Button */
.primary-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 255, 255, 0.2);
}

.primary-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

/* Gauge Meter */
.gauge-container {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s ease;
    width: 100%;
}

.gauge-container.hidden {
    display: none;
}

.gauge {
    position: relative;
    width: 100%;
    max-width: 320px;
    min-width: 200px;
}

.gauge-svg {
    width: 100%;
    height: auto;
    overflow: visible;
    display: block;
}

/* Track (background) */
.gauge-track {
    fill: none;
    stroke: #1a1a1a;
    stroke-width: 14;
    stroke-linecap: round;
}

/* Colored arc */
.gauge-arc {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
}

/* Tick marks */
.gauge-ticks line {
    stroke: #333;
    stroke-width: 2;
    stroke-linecap: round;
}

/* Needle */
.gauge-needle {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-box: view-box;
    transform-origin: 100px 100px;
}

.gauge-needle polygon {
    fill: #fff;
}

/* Static base circles */
.needle-cap {
    fill: #222;
    stroke: #444;
    stroke-width: 2;
}

.needle-center {
    fill: #fff;
}

/* Value display */
.gauge-value-container {
    position: absolute;
    bottom: 35%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
}

.gauge-value {
    font-size: clamp(28px, 8vw, 48px);
    font-weight: 700;
    color: #fff;
    display: block;
    line-height: 1;
}

.gauge-unit {
    font-size: clamp(10px, 3vw, 14px);
    color: #666;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Labels */
.gauge-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 8px 0 0;
    font-size: clamp(9px, 2.5vw, 12px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.label-weak { color: #ef4444; }
.label-average { color: #f59e0b; }
.label-strong { color: #22c55e; }

/* Strength text result */
.strength-text {
    margin-top: 16px;
    font-size: clamp(18px, 5vw, 28px);
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.strength-text.weak { 
    color: #ef4444;
    text-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}
.strength-text.average { 
    color: #f59e0b;
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
}
.strength-text.strong { 
    color: #22c55e;
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
}

/* Home Page */
.home-hero {
    text-align: center;
    margin-bottom: 48px;
}

.home-hero h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero p {
    color: #888;
    font-size: 16px;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

.nav-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .nav-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

.nav-card {
    background: #151515; /* Solid color instead of transparent rgba */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
}

.nav-card:hover {
    background: #1a1a1a; /* Solid hover color */
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    padding-right: 30px; /* Space for arrow */
}

.nav-card p {
    font-size: 14px;
    color: #999;
    padding-right: 10px;
    line-height: 1.5;
    margin: 0;
}

.card-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    color: #fff;
    font-size: 20px;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.nav-card:hover .card-arrow {
    transform: translateX(4px);
    opacity: 1;
}

/* Text Content */
.content-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
}

.type-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    margin-top: 32px;
}

.type-title:first-child {
    margin-top: 0;
}

.type-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #ccc;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 600px) {
    main {
        padding: 24px 16px; /* Reduced top/bottom padding */
    }
    
    header {
        padding: 16px 20px;
    }

    .logo {
        font-size: 22px;
    }

    .home-hero {
        margin-bottom: 32px;
    }

    .home-hero h1 {
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .page h2 {
        font-size: 22px;
        margin-bottom: 24px;
    }
    
    /* ... existing styles ... */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group input {
        padding: 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .toggle-group {
        margin-bottom: 24px;
    }
    
    .toggle-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .primary-btn {
        padding: 16px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    main {
        padding: 24px 16px;
    }
    
    header {
        padding: 16px 20px;
    }
    
    .logo {
        font-size: 16px;
    }
}

/* Large screens */
@media (min-width: 768px) {
    .gauge {
        max-width: 360px;
    }
}
