@import url('https://fonts.googleapis.com/css2?family=Teko:wght@400;600&family=Roboto+Condensed:wght@400;700&display=swap');

:root {
    --primary-color-dark: #0a0a0a;
    --card-background-dark: #1a1a1a;
    --text-color-dark: #e0e0e0;
    --text-muted-dark: #a0a0a0;
    --border-color-dark: #2a2a2a;

    --primary-color-light: #f4f4f4;
    --card-background-light: #ffffff;
    --text-color-light: #2c2c2c;
    --text-muted-light: #737373;
    --border-color-light: #e0e0e0;

    --accent-color-primary: #00bfff; /* Refined Blue */
    --accent-color-secondary: #9b59b6; /* Washed Purple */
    --font-family-headings: 'Teko', sans-serif;
    --font-family-body: 'Roboto Condensed', sans-serif;
}

body {
    font-family: var(--font-family-body);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

/* Theme variable assignment */
body.dark-mode {
    --card-background: var(--card-background-dark);
    --text-color: var(--text-color-dark);
    --text-muted: var(--text-muted-dark);
    --border-color: var(--border-color-dark);
    --primary-color: var(--primary-color-dark);
    --shadow-color: rgba(0, 191, 255, 0.15);
    background-color: var(--primary-color-dark);
    color: var(--text-color-dark);
    background-image:
        linear-gradient(rgba(10, 10, 10, 0.97), rgba(10, 10, 10, 0.97)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%239C92AC' fill-opacity='0.05' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
}

body.light-mode {
    --card-background: var(--card-background-light);
    --text-color: var(--text-color-light);
    --text-muted: var(--text-muted-light);
    --border-color: var(--border-color-light);
    --primary-color: var(--primary-color-light);
    --shadow-color: rgba(155, 89, 182, 0.15);
    background-color: var(--primary-color-light);
    color: var(--text-color-light);
}

.hero-section {
    position: relative;
    background: linear-gradient(rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.7)), url('https://images.unsplash.com/photo-1517836357463-d25769a63318?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 3rem 2rem;
    text-align: center;
}

.display-mode-toggle {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    cursor: pointer;
    font-size: 1.5rem;
    color: #fff;
    transition: transform 0.3s, color 0.3s;
}

.display-mode-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    color: var(--accent-color-primary);
}

.hero-content h1 {
    font-family: var(--font-family-headings);
    font-size: 4.5rem;
    margin: 0;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0, 191, 255, 0.5), 0 0 8px rgba(0, 191, 255, 0.3);
    font-weight: 600;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted-dark);
    margin-top: 0.25rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-family: var(--font-family-headings);
    font-size: 3rem;
    border-bottom: 2px solid var(--accent-color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    font-weight: 400;
    color: inherit;
}

footer {
    text-align: center;
    padding: 2rem;
    color: inherit;
    opacity: 0.7;
}

.tabs {
    display: flex;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: var(--font-family-body);
    transition: color 0.3s, text-shadow 0.3s, border-bottom-color 0.3s;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.tab-button.active {
    color: var(--accent-color-primary);
    border-bottom-color: var(--accent-color-primary);
}

body.dark-mode .tab-button.active {
    text-shadow: 0 0 8px rgba(0, 191, 255, 0.3);
}

.tab-button i { margin-right: 0.75rem; }

.tab-content { display: none; }
.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

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

#strategy-grid, .content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.workouts-control {
    margin-bottom: 2rem;
}

.workouts-control .button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.workouts-control button {
    border: 1px solid var(--accent-color-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s, color 0.3s, box-shadow 0.3s;
    background-color: var(--card-background);
    color: var(--accent-color-secondary);
}

.workouts-control button:hover, .workouts-control button.active {
    background-color: var(--accent-color-secondary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.workouts-container .workout-card-wrapper { display: none; }
.workouts-container .workout-card-wrapper.active { display: block; }

.data-management {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.data-management button {
    background-color: transparent;
    border: 1px solid var(--accent-color-primary);
    color: var(--accent-color-primary);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}
.data-management button:hover {
    background-color: var(--accent-color-primary);
    color: var(--card-background);
}

#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--accent-color-primary);
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 100;
    right: 30px;
    bottom: 30px;
    font-size: 1.1rem;
    font-family: var(--font-family-body);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.4);
}

#toast.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

/* --- NEW --- Responsive Styles for Mobile */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    h2 {
        font-size: 2.5rem;
    }
    main {
        padding: 1rem;
    }
    .tab-button span {
        display: none; /* Hide text labels on tabs */
    }
    .tab-button i {
        margin-right: 0; /* Remove margin when text is hidden */
    }
    #strategy-grid, .content-grid {
        grid-template-columns: 1fr; /* Stack cards in a single column */
    }
}