:root {
    --strava-orange: #fc4c02;
    --strava-orange-dark: #e04400;
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

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

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-darker);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--strava-orange);
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--strava-orange);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-light);
    padding: 8rem 2rem 4rem;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--strava-orange), #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--strava-orange);
    color: white;
}

.btn-primary:hover {
    background: var(--strava-orange-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--strava-orange);
    border: 2px solid var(--strava-orange);
}

.btn-secondary:hover {
    background: var(--strava-orange);
    color: white;
}

/* Sections */
.section {
    padding: 5rem 2rem;
}

.section-dark {
    background: var(--bg-light);
}

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

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

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--strava-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.feature h3 {
    margin-bottom: 0.5rem;
}

/* Architecture */
.architecture {
    margin-top: 3rem;
    text-align: center;
}

.arch-diagram {
    background: var(--bg-darker);
    color: var(--strava-orange);
    padding: 2rem;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
    text-align: left;
    display: inline-block;
}

/* Dashboard */
.dashboard-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dashboard-controls input,
.dashboard-controls select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    width: 300px;
    background: white;
}

.dashboard-controls select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dashboard-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

.dashboard-hint a {
    color: var(--strava-orange);
}

.dashboard-content.hidden,
.error-message.hidden {
    display: none;
}

.error-message {
    background: #fee;
    color: #c00;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--strava-orange);
}

.stat-label {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.chart-container h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Activities Table */
.activities-table {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow-x: auto;
}

.activities-table h3 {
    margin-bottom: 1rem;
}

.activities-table table {
    width: 100%;
    border-collapse: collapse;
}

.activities-table th,
.activities-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.activities-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.activities-table tr:hover {
    background: var(--bg-light);
}

/* API Docs */
.api-docs {
    max-width: 800px;
    margin: 0 auto;
}

.endpoint {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: bold;
}

.method.get {
    background: #28a745;
    color: white;
}

.method.post {
    background: #007bff;
    color: white;
}

.endpoint code {
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--text-dark);
}

.endpoint p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

pre.response {
    background: var(--bg-darker);
    color: #98c379;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.875rem;
}

.docs-link {
    text-align: center;
    margin-top: 2rem;
}

.docs-link p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.docs-link .btn {
    margin: 0 0.5rem;
}

/* Setup Steps */
.setup-steps {
    max-width: 800px;
    margin: 0 auto;
}

.setup-step {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

.setup-step h3 {
    color: var(--strava-orange);
    margin-bottom: 1rem;
}

.setup-step ol {
    padding-left: 1.5rem;
}

.setup-step li {
    margin-bottom: 0.5rem;
}

.setup-step a {
    color: var(--strava-orange);
}

.setup-step code {
    background: var(--bg-light);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.code-block {
    background: var(--bg-darker);
    color: var(--text-light);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: var(--bg-darker);
    color: var(--text-muted);
    padding: 2rem;
    text-align: center;
}

.footer a {
    color: var(--strava-orange);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .nav-links a {
        margin: 0 0.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-controls input {
        width: 100%;
    }

    .login-card {
        margin: 0 1rem;
    }
}

/* Login Form */
.login-form {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 400px;
}

.login-card h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--strava-orange);
}

.btn-full {
    width: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.login-error {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fee;
    color: #c00;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
}

.login-error.hidden {
    display: none;
}

/* Auth Status */
.auth-status {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.auth-status.logged-in {
    color: #28a745;
}

/* Hidden class */
.hidden {
    display: none !important;
}
