:root {
    --primary-color: var(--sova-navy);
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --background-color: #f8f9fa;
    --text-color: #333;
    --light-text-color: #fff;
    --border-color: #dee2e6;
    --error-color: #f44336;
}

/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header Styles */
.header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo a {
    color: var(--light-text-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav a:hover {
    opacity: 0.8;
}

/* Content Styles */
.content {
    padding: 2rem 0;
}

.page-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.section-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* Profile Styles */
.profile-container, .profile-display, .edit-profile-form, .game-log {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.profile-item {
    display: flex;
    flex-direction: column;
}

.profile-label, .form-group label {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.profile-value {
    font-size: 1.1rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    cursor: pointer;
    border: none;
}
.mock-graph-container {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 800px; /* Increased maximum width */
    margin-left: auto;
    margin-right: auto;
}

.graph-filters {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.graph-filters button {
    flex: 1;
    min-width: 120px;
    white-space: nowrap;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.graph-filters button:hover {
    background-color: var(--sova-purple-dark);
    transform: translateY(-2px);
}

.graph-filters button.active {
    background-color: var(--primary-color);
}

#myChart {
    width: 100%;
    height: 500px !important; /* Increased fixed height */
    max-height: 500px !important; /* Ensure it doesn't exceed this height */
}

@media (max-width: 767px) {
    .graph-filters {
        flex-direction: column;
    }

    .graph-filters button {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    #myChart {
        height: 350px !important; /* Increased height on mobile */
        max-height: 350px !important;
        font-size: 12px; /* Slightly increased font size */
        width: 800px;
    }
}

canvas#myChart {
    margin-top: 40px; /* Adjust based on your layout needs */
}

#myChart + .chartjs-legend {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px;
}

#myChart + .chartjs-legend li {
    cursor: pointer;
    margin: 0 10px;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background-color: #f0f0f0;
    border: 2px solid transparent;
}

    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.4);
    }
    .modal-content {
        background-color: #fefefe;
        margin: 15% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 80%;
        max-width: 500px;
        border-radius: 5px;
    }
    .button-container {
        display: flex;
        justify-content: space-between;
        margin-top: 20px;
    }
    
    .btn {
        margin-inline: 5px;
        padding: 10px 20px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }
    .btn-primary {
        background-color: var(--sova-teal);
        color: white;
    }
    .btn-secondary {
        background-color: #f44336;
        color: white;
    }
    .notification {
        position: fixed;
        top: 20px;
        right: 20px;
        padding: 15px;
        border-radius: 5px;
        color: white;
        z-index: 1001;
    }
    .notification.success {
        background-color: var(--sova-teal);
    }
    .notification.error {
        background-color: #f44336;
    }
    
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}
.confirmation-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.confirmation-content button {
    margin: 10px;
    padding: 5px 10px;
}
#myChart + .chartjs-legend li:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#myChart + .chartjs-legend li.hidden {
    opacity: 0.5;
}

/* Ensure the container doesn't overflow on very small screens */
.game-log {
    max-width: 100%;
    overflow-x: hidden;
}

/* Additional styles for better spacing and readability */
h2, h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.doc-in-the-box {
    margin-top: 1.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.btn-primary:hover {
    background-color: var(--sova-navy-dark);
}

.btn-success {
    background-color: var(--accent-color);
    color: var(--light-text-color);
}

.btn-success:hover {
    background-color: var(--sova-teal-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
}

.btn-secondary:hover {
    background-color: var(--sova-purple-dark);
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
}

#cancelEditBtn {
    background-color: var(--error-color);
    color: var(--light-text-color);
}

#cancelEditBtn:hover {
    background-color: #d32f2f;
}

/* Game Log Styles */
.doc-in-the-box {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    
    overflow: hidden;
}

.game-log-date {
    background-color: #f5f5f5;
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-log-content {
    padding: 20px;
}

.assessment {
    margin-bottom: 20px;
}

.assessment h5 {
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.task {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    margin-left: 20px;
}

.task h6 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.nested-list {
    list-style-type: none;
    padding-left: 20px;
}

.nested-list .key {
    font-weight: bold;
    color: var(--secondary-color);
}

.nested-list .value {
    color: var(--text-color);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.game-log-date[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* Chart Styles */
.chart-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

.chart-container canvas {
    max-width: 100%;
    height: auto !important;
    margin: 10px;
}

.chart-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: var(--primary-color);
}

/* Progress Bar Styles */
.progress-container {
    flex-grow: 1;
    background-color: #e0e0e0;
    height: 10px;
    border-radius: 5px;
    margin: 0 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    font-weight: bold;
}

.progress-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    width: 80px;
}

/* Streak Visualization */
.streak-visualization {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.streak-bar {
    height: 100%;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.streak-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--secondary-color);
}

/* Footer Styles */
.footer {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .profile-info, .form-actions {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .edit-profile-form form {
        max-width: 100%;
    }

    .chart-container {
        width: 100%;
        padding: 0 10px;
    }

    .game-log-entry h4 {
        font-size: 1em;
    }

    .game-log-content {
        font-size: 0.9em;
    }
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.task-card {
    background: #ffffff;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-header h3 {
    font-size: 1.1em;
    margin: 0;
    color: var(--primary-color);
}

.task-status {
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 12px;
}

.task-status.in-progress {
    background: var(--sova-teal-tint);
    color: var(--sova-teal);
}

.task-status.pending {
    background: var(--sova-purple-tint);
    color: var(--sova-purple);
}

.task-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
}

@media (max-width: 480px) {
    .chart-container {
        padding: 0 5px;
    }

    .chart-container canvas {
        height: 300px !important;
    }

    .game-log-entry h4 {
        font-size: 0.9em;
    }

    .game-log-content {
        font-size: 0.8em;
    }
}

.game-selector {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: flex-start;
}

.radar-game-button, .bar-game-button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: black;
    cursor: pointer;
    transition: all 0.2s;
    flex: 0 1 auto;
    min-width: auto;
    white-space: nowrap;
}

.radar-game-button.active, .bar-game-button.active {
    background: var(--sova-teal);
    color: white;
    border-color: var(--sova-teal);
}

.radar-game-button:hover, .bar-game-button:hover {
    background: var(--sova-teal);
    color: white;
}

.stats-card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
}

.progress-item {
    margin-bottom: 15px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.progress-bar-container {
    background: var(--sova-teal-tint);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    background: var(--sova-teal);
    height: 100%;
    transition: width 0.3s ease;
}

.streak-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.chart-area {
    height: 500px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        align-items: flex-start;
        margin: 0px;
    }
    .chart-area {
        height: 300px;
        margin-top: 20px;
    }

    .nav {
        margin-top: 10px;
    }

    .nav a {
        margin-left: 0;
        margin-right: 20px;
    }

    .hero {
        margin-top: 100px;
        padding: 4em 0 3em;
    }
    .game-selector {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .game-button {
        flex: 0 1 auto;
        min-width: 120px;
    }
}
@media (max-width: 480px) {
    .game-button {
        min-width: 100px;
        font-size: 0.9em;
    }
}