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

:root {
    --primary-blue: #2563eb;
    --primary-purple: #7c3aed;
    --accent-gold: #f59e0b;
    --dark-text: #1f2937;
    --light-text: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    overflow-x: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: relative;
}

/* Hamburger Button */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--dark-text);
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: left;
}

/* Hamburger Animation */
.hamburger.active span:first-child {
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:last-child {
    transform: rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 1rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-nav {
        display: block;
    }
    
    nav {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }

    .logo-img {
        height: 32px;
    }
}

/* Overlay for mobile menu */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
/* Nolan Chart Styles */
.nolan-chart-wrapper {
    margin: 0 auto 0.5rem auto;
    animation: fadeInUp 1s ease-out;
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    background: transparent;
}

.nolan-chart {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    width: 100%;
    height: 100%;
    background: transparent;
}

.quadrant-bg {
    transition: opacity 0.3s ease;
}

/* Remove the hover effect that changes colors
.nolan-chart:hover .quadrant-bg {
    opacity: 0.8;
}
*/

.floating-dot {
    animation: float-dot 8s ease-in-out infinite;
}

.floating-dot.dot1 { animation-delay: 0s; }
.floating-dot.dot2 { animation-delay: 1.3s; }
.floating-dot.dot3 { animation-delay: 2.6s; }
.floating-dot.dot4 { animation-delay: 3.9s; }
.floating-dot.dot5 { animation-delay: 5.2s; }
.floating-dot.dot6 { animation-delay: 6.5s; }

@keyframes float-dot {
    0%, 100% { transform: translate(0, 0); opacity: 0.7; }
    25% { transform: translate(10px, -10px); opacity: 1; }
    50% { transform: translate(-10px, 10px); opacity: 0.5; }
    75% { transform: translate(5px, 5px); opacity: 0.9; }
}

.question-mark {
    animation: pulse-question 3s ease-in-out infinite;
}

@keyframes pulse-question {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.libertarian-bg { fill: rgba(255,200,0,0.7); }
.progressive-bg { fill: rgba(50,120,255,0.7); }
.communitarian-bg { fill: rgba(120,120,120,0.7); }
.conservative-bg { fill: rgba(240,60,60,0.7); }
.moderate-bg { fill: rgba(160,120,200,0.7); }

/* Hero Section */
.hero {
    min-height: calc(100vh - 60px); /* Subtract header height */
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    margin-top: 60px;
    padding: 1rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    transform: translate(-50%, -50%);
    animation: float 20s linear infinite;
    z-index: 1;
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    max-width: 800px;
    padding: 1rem;
    position: relative;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.quiz-cta {
    background: var(--accent-gold);
    color: var(--dark-text);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    animation: fadeInUp 1s ease-out 0.4s both, pulse 2s ease-in-out infinite;
    display: inline-block;
    text-decoration: none;
}

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

.quiz-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.quiz-time {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Philosophy Section */
.philosophy {
    padding: 5rem 2rem;
    background: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.principle-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.principle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
}

.principle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.principle-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.principle-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.principle-card p {
    color: var(--light-text);
    line-height: 1.8;
}

/* Central Quote */
.central-quote {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.quote-text {
    font-size: 1.75rem;
    font-weight: 300;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
    font-style: italic;
}

.quote-text strong {
    font-weight: 700;
}

/* Political Types Preview */
.political-types {
    padding: 5rem 2rem;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.section-header p {
    font-size: 1.25rem;
    color: var(--light-text);
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.type-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.type-card:hover {
    transform: scale(1.05);
}

.type-card.liberal {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.type-card.conservative {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.type-card.libertarian {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.type-card.communitarian {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.type-card.moderate {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

/* CTA Section */
.final-cta {
    background: var(--bg-light);
    padding: 5rem 2rem;
    text-align: center;
}

.final-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.final-cta p {
    font-size: 1.25rem;
    color: var(--light-text);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background: var(--dark-text);
    color: white;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive - Tablet and Mobile */
@media (max-width: 768px) {
    /* Hero section adjustments */
    .hero {
        min-height: auto;  /* Remove full viewport height */
        padding: 1rem 0;   /* Reduce padding */
        margin-top: 60px;  /* Keep header spacing */
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    /* Nolan Chart with proper spacing */
    .nolan-chart-wrapper {
        width: 400px;
        height: 400px;
        transform: scale(0.75);  /* 75% size */
        transform-origin: center center;
        margin: -50px auto -50px auto;  /* Equal negative margins top and bottom */
    }
    
    /* Hero text adjustments */
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    /* CTA button adjustments */
    .quiz-cta {
        padding: 1rem 2rem;
        font-size: 1rem;
        margin-bottom: 1rem;  /* Add some bottom margin */
    }
    
    .quiz-time {
        font-size: 0.8rem;
    }
    
    /* Other mobile navigation styles */
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-nav {
        display: block;
    }
    
    nav {
        padding: 1rem;
    }
    
    .logo-img {
        height: 32px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .hero {
        padding: 0.5rem 0;
    }
    
    .nolan-chart-wrapper {
        transform: scale(0.6);  /* 60% size */
        margin: -80px auto -80px auto;  /* Balanced negative margins */
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .quiz-cta {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}