:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.5rem;
}

[data-theme="dark"] {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 221.2 83.2% 53.3%;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    overflow-x: hidden;
}

.container {
    position: relative;
    z-index: 0;
    display: flex;
    min-height: 100vh;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: hsl(var(--background));
}

/* Simple black background - no gradients */

.main-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 2rem 1.25rem;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex: 1;
    flex-direction: column;
    gap: 1rem;
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    background: hsl(var(--background));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--ring));
}

.theme-toggle svg {
    color: hsl(var(--foreground));
    transition: all 0.3s ease;
}

.sun-icon {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

.moon-icon {
    position: absolute;
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

[data-theme="dark"] .sun-icon {
    transform: rotate(-90deg) scale(0);
    opacity: 0;
}

[data-theme="dark"] .moon-icon {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem 1.25rem;
    margin-bottom: 2.25rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: hsl(var(--foreground));
    margin: 0;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: clamp(3rem, 8vw, 5rem);
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: clamp(3.75rem, 8vw, 6rem);
        font-weight: 800;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
    max-width: 600px;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

.hero-description {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

.hero-author {
    font-size: 0.95rem;
    color: var(--foreground);
    font-weight: 500;
    margin-bottom: 2rem;
}

.navigation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.nav-button {
    padding: 0.75rem 2rem;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    background: var(--accent);
    border-color: var(--primary);
}

.nav-button.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-section {
    margin-bottom: 3rem;
    position: relative;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.content-section:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    border-color: hsl(var(--ring));
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border));
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin: 0;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-radius: var(--radius);
    font-size: 1.125rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
    font-size: 1rem;
    z-index: 10;
    pointer-events: none;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    font-family: inherit;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    border-radius: var(--radius);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-input:hover,
.form-select:hover {
    border-color: hsl(var(--ring));
}

.range-slider {
    width: 100%;
    height: 1.25rem;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

/* Clean Slider Track */
.range-slider::-webkit-slider-track {
    width: 100%;
    height: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 9999px;
}

/* Clean Slider Thumb */
.range-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    height: 1.25rem;
    width: 1.25rem;
    background: hsl(var(--primary));
    border: 2px solid hsl(var(--background));
    border-radius: 50%;
    cursor: pointer;
    margin-top: -0.375rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    position: relative;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.range-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.3);
    outline: none;
}

/* Firefox */
.range-slider::-moz-range-track {
    width: 100%;
    height: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 9999px;
}

.range-slider::-moz-range-thumb {
    height: 1.25rem;
    width: 1.25rem;
    background: hsl(var(--primary));
    border: 2px solid hsl(var(--background));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.range-slider:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.3);
}

/* Edge */
.range-slider::-ms-track {
    width: 100%;
    height: 0.5rem;
    background: transparent;
    border-color: transparent;
    color: transparent;
    border-radius: 9999px;
}

.range-slider::-ms-thumb {
    height: 1.25rem;
    width: 1.25rem;
    background: hsl(var(--primary));
    border: 2px solid hsl(var(--background));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Clean Slider Design */
.slider-container {
    padding: 1.5rem;
    background: hsl(var(--muted) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    margin-top: 0.5rem;
    position: relative;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.slider-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.slider-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 9999px;
    min-width: 2.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.slider-track-container {
    position: relative;
    height: 0.5rem;
    background: hsl(var(--secondary));
    border-radius: 9999px;
    margin: 1rem 0;
}

.slider-track-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: hsl(var(--primary));
    border-radius: 9999px;
    transition: width 0.2s ease;
    pointer-events: none;
}

.checkbox-group {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.checkbox-item:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary));
}

.checkbox-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: hsl(var(--primary));
    margin: 0;
}

.checkbox-label {
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    color: hsl(var(--foreground));
}

.form-divider {
    border: none;
    border-top: 1px solid hsl(var(--border));
    margin: 2rem 0;
}

.predict-button {
    width: 100%;
    padding: 1rem 2rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px 0 rgba(0,0,0,0.1);
}

.predict-button:hover:not(:disabled) {
    background: hsl(var(--primary) / 0.9);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px 0 rgba(0,0,0,0.15);
}

.predict-button:active:not(:disabled) {
    transform: translateY(0);
}

.predict-button:disabled {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.predict-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.2), 
        transparent
    );
    transition: left 0.5s ease;
}

.predict-button:hover::before {
    left: 100%;
}

.results-card {
    margin-top: 3rem;
    padding: 2rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    display: none;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    overflow: hidden;
}

.results-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        hsl(var(--primary)), 
        hsl(var(--primary) / 0.7), 
        hsl(var(--primary))
    );
    border-radius: var(--radius) var(--radius) 0 0;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.results-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.1), 
        transparent
    );
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.results-card.show {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(2rem);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.rating-display {
    text-align: center;
    margin: 2rem 0;
}

.rating-value {
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 800;
    background: linear-gradient(135deg, 
        hsl(var(--primary)) 0%, 
        hsl(var(--primary) / 0.8) 50%,
        hsl(var(--primary)) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: hsl(var(--primary));
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 1rem 0;
    font-size: 1.5rem;
}

.rating-stars i {
    color: #fbbf24;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

[data-theme="light"] .rating-stars i {
    color: #f59e0b;
}

.rating-category {
    background: hsl(var(--primary) / 0.1);
    border: 1px solid hsl(var(--primary) / 0.2);
    border-left: 4px solid hsl(var(--primary));
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    text-align: center;
    font-style: italic;
    color: hsl(var(--foreground));
    font-weight: 500;
}

.details-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    display: none;
}

.details-panel.show {
    display: block;
    animation: expandDown 0.3s ease-out;
}

@keyframes expandDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

.details-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto 0;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.details-toggle:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary));
    color: hsl(var(--foreground));
}

.details-toggle i {
    transition: transform 0.3s ease;
}

.details-toggle.active i {
    transform: rotate(180deg);
}

.details-section h3 {
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid hsl(var(--border));
    padding-bottom: 0.5rem;
}

.details-content p {
    margin: 0.75rem 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    line-height: 1.5;
}

.footer {
    text-align: center;
    margin-top: 4rem;
    padding: 3rem 2rem;
    border-top: 1px solid hsl(var(--border));
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    background: hsl(var(--background));
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.contributors {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.description {
    font-style: italic;
    opacity: 0.8;
}

.error-alert {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive-foreground));
    border: 1px solid hsl(var(--destructive) / 0.2);
    border-left: 4px solid hsl(var(--destructive));
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    display: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.error-alert.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        padding: 0 1.5rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 1.5rem 1rem;
    }

    .hero-section {
        padding: 4rem 1rem 3rem;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .theme-toggle i {
        font-size: 1rem;
    }

    .navigation-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 2rem;
    }

    .nav-button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .content-wrapper {
        padding: 0 1rem;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .form-input,
    .form-select {
        padding-left: 1rem;
    }

    .input-icon {
        display: none;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }
}