/* Fix footer overflow */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    overflow: hidden;
}

.progress-section {
    position: relative;
    padding-bottom: 4rem; /* Add breathing room */
}

.graph-container {
    max-height: 400px;
    overflow: hidden;
    position: relative;
}

/* Make Chart.js responsive */
canvas {
    max-width: 100%;
    height: auto!important;
}

@media (max-width: 1024px) {
    .progress-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .graph-container {
        min-height: 300px;
        max-height: 400px;
    }
}
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-left: 2.5rem;
    margin-right: 2.5rem;
}

@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
        margin-left: 2rem;
        margin-right: 2rem;
    }
    
    .game-card {
        width: 70%;  /* Make cards 30% smaller */
        margin: 0 auto;  /* Center the cards */
        padding: 1rem 0.7rem;  /* Reduce padding proportionally */
    }
    
    .game-img {
        width: 45px;  /* Reduce image size proportionally */
        height: 45px;
    }
}

.game-card {
    background: rgba(0, 246, 255, 0.05);
    border: 1px solid rgba(0, 246, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,246,255,0.04);
    transition: transform 0.15s;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--neon-cyan);
}

.game-card h3 {
    margin-top: 0;
    color: var(--neon-cyan);
}

.game-card .btn-link {
    text-decoration: none;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    background: var(--neon-cyan);
    color: #0a0a0f;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.game-card .btn-link:hover {
    background: #00d4ff;
}

.game-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.tip-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    margin: 1rem 0;
    border-left: 4px solid var(--neon-cyan);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}

.tip-card:hover {
    transform: translateX(10px);
}

.tip-card::after {
    content: '\f054';  /* Font Awesome right arrow */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tip-card:hover::after {
    opacity: 1;
}

.tip-card h3 {
    margin-top: 0;
    color: var(--neon-cyan);
    margin-bottom: 0.5rem;
}

.tip-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    border: 1px solid rgba(0, 246, 255, 0.2);
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    box-shadow: 0 0 30px rgba(0, 246, 255, 0.1);
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--neon-cyan);
    background: rgba(0, 246, 255, 0.1);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--neon-cyan);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
}

.modal-content p {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.modal-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    background: rgba(0, 246, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 246, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 246, 255, 0.1);
}

.feature i {
    color: var(--neon-cyan);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
}

.feature span {
    color: var(--text-color);
    display: block;
    font-size: 1.1rem;
}

.modal-actions {
    text-align: center;
    margin-top: 2rem;
}

.start-test-btn {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background: var(--neon-cyan);
    color: var(--dark-bg);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 246, 255, 0.2);
}

.start-test-btn:hover {
    background: #00d4ff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 246, 255, 0.3);
}

.dont-show-again {
    display: block;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.dont-show-again:hover {
    opacity: 1;
}

.dont-show-again input {
    margin-right: 0.5rem;
    accent-color: var(--neon-cyan);
}


@media (max-width: 700px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .modal-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.4;
    }

    .close-modal {
        right: 1rem;
        top: 1rem;
        font-size: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .start-test-btn {
        width: 100%;
        padding: 0.8rem;
    }

    .dont-show-again {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}