/* Theme variables */
:root {
    --bg-primary: #fcfcfc;
    --bg-secondary: #ffffff;
    --text-primary: #333;
    --text-secondary: #444;
    --text-muted: #718096;
    --border-color: #f0f0f0;
    --card-bg: #ffffff;
    --card-border: #edf2f7;
    --card-shadow: rgba(0,0,0,0.05);
    --hover-bg: #f7fafc;
    --button-bg: #2d3748;
    --button-hover: #1a202c;
    --button-secondary: #4a5568;
    --button-secondary-hover: #2d3748;
    --button-accent: #3182ce;
    --button-accent-hover: #2c5282;
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #888;
    --border-color: #404040;
    --card-bg: #2d2d2d;
    --card-border: #404040;
    --card-shadow: rgba(0,0,0,0.2);
    --hover-bg: #363636;
    --button-bg: #4a5568;
    --button-hover: #2d3748;
    --button-secondary: #718096;
    --button-secondary-hover: #4a5568;
    --button-accent: #4299e1;
    --button-accent-hover: #3182ce;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 1px 3px var(--card-shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

h1 {
    text-align: center;
    font-size: 2.2rem;
    font-family: 'Playfair Display', Georgia, serif;
    margin-bottom: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.3px;
}

p {
    margin-bottom: 1.2em;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.chart-container {
    position: relative;
    height: 60vh;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--button-bg);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--card-shadow);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    background: var(--button-hover);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Update existing styles to use CSS variables */
button {
    background-color: var(--button-bg);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

button:hover {
    background-color: var(--button-hover);
    transform: translateY(-1px);
}

button.restart {
    background-color: var(--button-secondary);
}

button.restart:hover {
    background-color: var(--button-secondary-hover);
}

button.show-all {
    background-color: var(--button-accent);
}

button.show-all:hover {
    background-color: var(--button-accent-hover);
}

.current-role {
    text-align: center;
    margin-bottom: 24px;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--hover-bg);
}

.current-role h2 {
    margin-bottom: 4px;
    font-size: 1.3rem;
}

.current-role p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.company-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.company-card {
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 12px;
    background-color: var(--card-bg);
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 2px var(--card-shadow);
}

.company-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px var(--card-shadow);
    border-color: var(--border-color);
}

.company-card h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.company-card .stat {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.summary {
    background-color: var(--card-bg);
    padding: 28px;
    border-radius: 10px;
    font-family: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
    line-height: 1.7;
}

.summary h2 {
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.summary ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.summary li {
    margin-bottom: 12px;
    font-size: 15px;
}

.disabled {
    opacity: 0.4;
}

/* New layout styles for desktop/mobile responsiveness */
.main-layout {
    display: flex;
    flex-direction: column;
}

.summary-container {
    width: 100%;
    margin-bottom: 24px;
}

.chart-wrapper {
    width: 100%;
}

/* Desktop layout */
@media (min-width: 768px) {
    body {
        padding: 36px;
    }
    
    .main-layout {
        flex-direction: row;
        gap: 32px;
        align-items: flex-start;
    }
    
    .summary-container {
        width: 50%;
        margin-bottom: 0;
    }
    
    .chart-wrapper {
        width: 55%;
    }
}

/* Ensure chart is properly contained */
.chart-box {
    position: relative;
    height: 70vh;
    width: 100%;
    margin-top: 20px;
}

/* Add font imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;600;700&family=Source+Serif+Pro:wght@400;600&display=swap');

.image-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--card-shadow);
}

.feature-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Desktop layout adjustments */
@media (min-width: 768px) {
    .image-container {
        margin: 3rem auto;
    }
}