* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    background-color: #1a1a2e;
}

.rainbow-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200vmax;
    height: 200vmax;
    margin-top: -100vmax;
    margin-left: -100vmax;
    background: conic-gradient(
        from 180deg at 50% 50%,
        #ff0000,
        #ff7f00,
        #ffff00,
        #00ff00,
        #0000ff,
        #4b0082,
        #9400d3,
        #ff0000
    );
    animation: rotateBackground 20s linear infinite;
    z-index: 0;
    opacity: 0.6;
}

@keyframes rotateBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.glass-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: white;
    transition: all 0.3s ease;
}

h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1.2rem;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
}

input:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

button {
    padding: 15px 30px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #ff007f, #7f00ff);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

button:active {
    transform: translateY(1px);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.2);
    margin-top: 20px;
    font-size: 1rem;
    padding: 10px 20px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Gauge Styles */
.result-section {
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

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

.gauge-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.gauge {
    width: 100%;
    height: auto;
    overflow: visible;
}

.gauge-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.gauge-fill {
    stroke: url(#rainbowGradient);
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* We'll inject the SVG gradient directly into the HTML or dynamically via JS. Let's do it via CSS with a solid color fallback, but linear gradient is not possible directly in CSS stroke without SVG defs. We'll add SVG defs in JS or HTML. */

.needle-container {
    position: absolute;
    bottom: 10%; /* relative to viewBox bottom, approx center of arc */
    left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(-90deg);
    transition: transform 2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 80%; /* length of needle */
    width: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.needle {
    width: 6px;
    height: 60%;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    margin-bottom: -10px; /* pull down to center */
}

.needle-center {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 2;
}

.percentage-display {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.verdict {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 25px;
    min-height: 1.5em;
    color: rgba(255,255,255,0.9);
}
