/* Theme Variables - Default Dark */
:root {
    --bg-color: #0f0f12;
    --card-bg: #1a1a21;
    --primary: #6366f1; /* Indigo */
    --accent: #a855f7;  /* Purple */
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --success: #10b981;
    --font-family: 'Outfit', sans-serif;
}

/* Light Theme */
body[data-theme="light"] {
    --bg-color: #ffffff;
    --card-bg: #f9fafb;
    --primary: #2563eb;
    --accent: #3b82f6;
    --text-main: #111827;
    --text-muted: #4b5563; /* Darker for better accessibility */
    --border: #d1d5db;
}

/* Ocean Theme */
body[data-theme="ocean"] {
    --bg-color: #0c1e2e;
    --card-bg: #1e3a4e;
    --primary: #0ea5e9;
    --accent: #06b6d4;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border: #2d4a5e;
}

/* Sunset Theme */
body[data-theme="sunset"] {
    --bg-color: #1a0f0a;
    --card-bg: #2e1a0f;
    --primary: #f97316;
    --accent: #fb923c;
    --text-main: #ffffff;
    --text-muted: #d1d5db;
    --border: #4a2a1a;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 500px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.highlight {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

header p {
    color: var(--text-muted);
}

.calculator-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input, select {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

[data-theme="light"] ::placeholder {
    color: #374151; /* Hardcoded darker color for light mode placeholders */
}

.calculate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    font-family: var(--font-family);
}

.calculate-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Result Section */
.result-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    animation: slideDown 0.4s ease-out;
}

.result-container.hidden {
    display: none;
}

.one-rep-max {
    text-align: center;
    margin-bottom: 1.5rem;
}

.one-rep-max .label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600; /* Added weight */
}

.one-rep-max .value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-main);
}

.one-rep-max .unit {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

.level-display {
    margin-bottom: 1.5rem;
    text-align: center;
}

.level-text {
    font-size: 2rem;
    color: var(--primary);
    margin: 0.5rem 0 1rem;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.progress-bar-container {
    position: relative;
    height: 10px;
    background: var(--bg-color);
    border-radius: 5px;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 5px;
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--primary);
}

.markers {
    position: absolute;
    width: 100%;
    top: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.markers span {
    position: absolute;
    transform: translateX(-50%);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.stat-value {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: fit-content;
}

.toggle-switch input {
    display: none;
}

.slider {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: var(--bg-color);
    border: 1px solid var(--border);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    border-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(30px);
    background-color: var(--primary);
}

.labels::after {
    content: attr(data-off);
    margin-left: 10px;
    font-weight: bold;
    color: var(--text-main);
}

input:checked ~ .labels::after {
    content: attr(data-on);
}

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

@media (max-width: 400px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Infographic Section */
.infographic-section {
    margin-top: 2.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: center;
}

.infographic-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.charts-container {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    flex-wrap: wrap;
}

.chart-card {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 0.5rem;
}

.progress-ring__circle {
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-linecap: round;
}

.chart-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-percent {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.chart-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600; /* Added weight */
}

.chart-card h4 {
    margin: 0.5rem 0 0.2rem;
    font-size: 1rem;
    color: var(--text-main);
}

.chart-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--text-main);
    background: var(--card-bg);
}

.main-nav a.active {
    color: var(--text-main);
    background: linear-gradient(to right, var(--primary), var(--accent));
}

/* Content Page Styles */
.content-page {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 2.5rem;
}

.content-section h2 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.content-section h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.content-section h4 {
    color: var(--text-main);
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
}

.content-section p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.content-section code {
    background: var(--bg-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}

.content-section sup {
    color: var(--primary);
    font-size: 0.75em;
}

.references-list {
    counter-reset: ref-counter;
    list-style: none;
    padding-left: 0;
}

.references-list li {
    counter-increment: ref-counter;
    padding: 0.75rem 0 0.75rem 2.5rem;
    position: relative;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
    font-size: 0.9rem;
}

.references-list li::before {
    content: "[" counter(ref-counter) "]";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

.references-list li:last-child {
    border-bottom: none;
}

.references-list em {
    font-style: italic;
    color: var(--text-main);
}

.formula-box {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin: 1rem 0;
}

.formula-box code {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.note {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-muted);
    opacity: 0.8;
}

.standards-list {
    list-style: none;
    padding-left: 0;
}

.standards-list li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.standards-list li:last-child {
    border-bottom: none;
}

.standards-list strong {
    color: var(--text-main);
}

/* Contact Section */
.contact-section {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.contact-form {
    margin-top: 1.5rem;
}

.contact-form textarea {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem 1rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    opacity: 0.6; /* Increased opacity from 0.4 */
    transition: opacity 0.3s;
    text-transform: lowercase;
}

.footer-nav a:hover {
    opacity: 0.7;
}

.nav-separator {
    color: var(--text-muted);
    opacity: 0.3;
    font-size: 0.7rem;
}

.version-badge {
    color: var(--text-muted);
    font-size: 0.65rem;
    opacity: 0.3;
    font-family: 'Courier New', monospace;
    user-select: none;
    transition: opacity 0.3s;
}

.version-badge:hover {
    opacity: 0.6;
}

/* Main Navigation - Prominent */
.main-nav {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--text-main);
    background: var(--card-bg);
}

.main-nav a.active {
    color: var(--text-main);
    background: linear-gradient(to right, var(--primary), var(--accent));
}

/* Report Page Styles */
.report-body {
    justify-content: center;
    align-items: flex-start;
}

#reportContainer {
    width: 100%;
    max-width: 1200px;
}

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

.section-desc {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.lift-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.lift-input-card {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.lift-input-card h3 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.report-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Overall Score Card */
.overall-score-card {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.overall-score-card h2 {
    color: white;
    margin-bottom: 1rem;
}

.score-circle {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 1rem auto;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.score-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.score-label {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.score-desc {
    color: white;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Radar Chart */
.chart-container-large {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.chart-container-large h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

/* Advanced Metrics Grid */
.advanced-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: linear-gradient(135deg, var(--card-bg), var(--bg-color));
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

.metric-card h3 {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.unit-small {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
}

.metric-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Lift Cards Grid */
.lift-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.lift-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.lift-card h3 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin: 0;
}

.lift-level {
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.lift-level.beginner {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

[data-theme="light"] .lift-level.beginner {
    background: rgba(239, 68, 68, 1);
    color: white;
}

.lift-level.novice {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

[data-theme="light"] .lift-level.novice {
    background: rgba(249, 115, 22, 1);
    color: white;
}

.lift-level.intermediate {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

[data-theme="light"] .lift-level.intermediate {
    background: rgba(234, 179, 8, 1);
    color: white;
}

.lift-level.advanced {
    background: rgba(132, 204, 22, 0.2);
    color: #84cc16;
}

[data-theme="light"] .lift-level.advanced {
    background: rgba(132, 204, 22, 1);
    color: white;
}

.lift-level.elite, .lift-level.elite\+ {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

[data-theme="light"] .lift-level.elite, [data-theme="light"] .lift-level.elite\+ {
    background: rgba(168, 85, 247, 1);
    color: white;
}

.lift-level.not-recorded {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

[data-theme="light"] .lift-level.not-recorded {
    background: rgba(107, 114, 128, 1);
    color: white;
}

.lift-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lift-card-stats .stat {
    text-align: center;
}

.lift-card-stats .stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.lift-card-stats .stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
}

.percentile-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.percentile-item {
    display: grid;
    grid-template-columns: 80px 1fr 40px;
    align-items: center;
    gap: 0.5rem;
}

.percentile-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.percentile-bar-bg {
    background: var(--bg-color);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.percentile-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #10b981, #34d399);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

.percentile-bar-fill.purple {
    background: linear-gradient(to right, var(--primary), var(--accent));
}

.percentile-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
}

.no-data {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem 0;
    font-style: italic;
}

/* Balance Analysis */
.balance-analysis {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.balance-analysis h2 {
    color: var(--text-main);
    margin-bottom: 1rem;
}

.balance-text {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1.05rem;
}

.recommendations {
    margin-top: 1.5rem;
}

.recommendations h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.recommendations ul {
    list-style: none;
    padding: 0;
}

.recommendations li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border-left: 3px solid var(--accent);
    border-radius: 5px;
    color: var(--text-muted);
}

.calculate-btn.secondary {
    background: var(--bg-color);
    border: 1px solid var(--border);
    color: var(--text-main);
}

[data-theme="light"] .calculate-btn.secondary {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

.calculate-btn.secondary:hover {
    background: var(--card-bg);
}

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

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-toggle-btn .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-main);
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.theme-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: none;
    min-width: 150px;
}

.theme-menu.active {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.theme-option {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.theme-option:hover {
    background: var(--bg-color);
}

.theme-option.active {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
}

.theme-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

/* Export Buttons */
.export-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border);
}

.export-section h2 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.export-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.export-btn.primary {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
}

.export-btn .material-symbols-outlined {
    font-size: 20px;
}

.export-btn.secondary {
    background: var(--bg-color);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.export-btn:active {
    transform: translateY(0);
}

/* Watermark for exports */
.export-watermark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: none;
}

.share-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    max-width: 90%;
    width: 400px;
}

.share-menu.active {
    display: block;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    display: none;
}

.share-overlay.active {
    display: block;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.share-option {
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-color);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.share-option .material-symbols-outlined {
    font-size: 32px;
    color: var(--primary);
    transition: color 0.3s;
}

.share-option:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.share-option:hover .material-symbols-outlined {
    color: white;
}

@media (max-width: 768px) {
    .theme-switcher {
        top: 10px;
        right: 10px;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .export-btn {
        width: 100%;
        justify-content: center;
    }
}
/* Spirit Animal Card */
.animal-card-container {
    margin-top: 2rem;
    perspective: 1000px;
}

.animal-card-container.hidden {
    display: none;
}

.animal-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animal-header {
    margin-bottom: 2rem;
}

.animal-badge {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.animal-icon-wrapper {
    width: 120px;
    height: 120px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
    border: 2px solid var(--border);
}

.animal-icon {
    font-size: 80px !important;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.animal-card h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.animal-trait-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: var(--bg-color);
    color: var(--primary);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.animal-why {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Animal Specific Themes */
.animal-tier-lion { --primary: #fbbf24; --accent: #ff6b00; }
.animal-tier-gorilla { --primary: #ff00e5; --accent: #7c3aed; }
.animal-tier-bear { --primary: #ff3e3e; --accent: #8b0000; }
.animal-tier-elk { --primary: #bef264; --accent: #10b981; }
.animal-tier-wolf { --primary: #ff6b00; --accent: #ff00e5; }
.animal-tier-deer { --primary: #00f2ff; --accent: #0066ff; }
.animal-tier-ant { --primary: #94a3b8; --accent: #64748b; }

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
    .animal-card { padding: 1.5rem; }
    .animal-card h2 { font-size: 2rem; }
    .animal-icon { font-size: 60px !important; }
    .animal-icon-wrapper { width: 100px; height: 100px; }
}

/* Save & Compare Section */
.save-compare-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    margin-top: 2rem;
    border: 1px solid var(--border);
}

.save-compare-section h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.save-form {
    margin-top: 1.5rem;
}

.save-form .form-group {
    margin-bottom: 1rem;
}

.save-form label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.save-form input[type="text"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-family);
}

.save-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.saved-confirmation {
    text-align: center;
}

.success-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.success-badge .material-symbols-outlined {
    font-size: 1.2rem;
}

.share-link-box {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.share-link-box label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.link-input-group {
    display: flex;
    gap: 0.5rem;
}

.link-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: monospace;
}

.copy-btn {
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    opacity: 0.9;
}

.copy-btn .material-symbols-outlined {
    font-size: 1.2rem;
}

/* Share Report Button */
.share-report-btn {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Leaderboard Section */
.leaderboard-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    margin-top: 2rem;
    border: 1px solid var(--border);
}

.leaderboard-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.leaderboard-section h2 .material-symbols-outlined {
    color: var(--primary);
}

.leaderboard-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.user-rank-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: white;
}

.rank-label {
    font-weight: 500;
    opacity: 0.9;
}

.rank-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.rank-score {
    margin-left: auto;
    opacity: 0.9;
}

.leaderboard-table {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 80px 80px;
    padding: 1rem;
    background: var(--card-bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr 80px 80px;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.2s;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item:hover {
    background: var(--card-bg);
}

.leaderboard-item.current-user {
    background: rgba(99, 102, 241, 0.1);
}

.col-rank {
    font-weight: 700;
    color: var(--text-muted);
}

.leaderboard-item .col-rank {
    font-size: 1.1rem;
}

.leaderboard-item:nth-child(1) .col-rank { color: #fbbf24; }
.leaderboard-item:nth-child(2) .col-rank { color: #9ca3af; }
.leaderboard-item:nth-child(3) .col-rank { color: #cd7f32; }

.col-user {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-main);
}

.user-gender {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.col-animal {
    font-size: 0.9rem;
    color: var(--accent);
}

.col-score {
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.load-more-btn {
    width: 100%;
    padding: 0.875rem;
    margin-top: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: var(--card-bg);
    border-color: var(--primary);
}

/* History Section */
.history-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    margin-top: 2rem;
    border: 1px solid var(--border);
}

.history-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.history-section h2 .material-symbols-outlined {
    color: var(--primary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: var(--primary);
}

.history-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.history-score {
    font-weight: 700;
    color: var(--primary);
}

.history-animal {
    font-size: 0.85rem;
    color: var(--accent);
}

/* Shared Report Banner */
.shared-report-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    margin-bottom: 2rem;
    color: white;
}

.shared-report-banner .viewer-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.shared-report-banner .viewer-user {
    font-size: 1.25rem;
    font-weight: 700;
}

.shared-report-banner .create-own-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.shared-report-banner .create-own-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state .material-symbols-outlined {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

@media (max-width: 480px) {
    .leaderboard-header,
    .leaderboard-item {
        grid-template-columns: 50px 1fr 60px 60px;
        font-size: 0.85rem;
    }
    
    .user-rank-banner {
        flex-wrap: wrap;
    }
    
    .rank-score {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* Leaderboard Page Specific Styles */
.leaderboard-page-container {
    max-width: 700px;
}

.leaderboard-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.leaderboard-full {
    margin-top: 0;
}

.leaderboard-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.leaderboard-header-bar h2 {
    margin-bottom: 0;
}

.leaderboard-full .leaderboard-list {
    max-height: 600px;
}

.leaderboard-cta {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
}

.leaderboard-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.leaderboard-cta p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.leaderboard-cta .calculate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.user-rank-banner .rank-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-rank-banner .rank-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.rank-animal {
    opacity: 0.9;
    font-weight: 500;
}

@media (max-width: 600px) {
    .leaderboard-header-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-rank-banner .rank-details {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
        justify-content: space-between;
    }
}
