/* styles.css */
:root {
    --light-square-bg: #f0d9b5;
    --dark-square-bg: #b58863;
    --selected-bg: #fff176;
    --valid-move-bg: #90ee90;
    --last-move-bg: #ffa;
    --threatened-bg: #ff6b6b;
    --protected-bg: #6b8eff;
    --low-threat-bg: #90EE90;
    --medium-threat-bg: #FFA500;
    --high-threat-bg: #FF4500;
    --potential-threat-bg: #FFD700;
    --primary-color: #2b70c5;
    --secondary-color: #f1911b;
    --success-color: #4CAF50;
    --danger-color: #f44336;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --transition: all 0.3s ease;
    --hint-from-bg: #ffff00; /* Yellow for from square */
    --hint-to-bg: #00ff00; /* Green for to square */
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
html {
    height: 100%;
    width: 100%;
}
body {
    background: linear-gradient(135deg, #87ceeb, #b0e2ff, #87ceeb);
    color: #333;
    height: 100%;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.app-container {
    width: 100%;
    height: 100%;
    position: relative;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    box-sizing: border-box;
}
.page {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
    padding: 20px;
    text-align: center;
}
.page.active {
    opacity: 1;
    visibility: visible;
}
.welcome-page {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.welcome-content {
    text-align: center;
    animation: fadeIn 1s ease;
}
.welcome-logo {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
}
.welcome-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    color: #2c3e50;
}
.welcome-subtitle {
    font-size: 1.8rem;
    margin-bottom: 40px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    color: #34495e;
    line-height: 1.6;
}
.progress-bar {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}
.progress {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 5s linear;
}
.theme-page, .language-page, .difficulty-page {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.page-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    color: #2c3e50;
}
.options-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}
.option-card {
    width: 150px;
    height: 200px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    border: 2px solid transparent;
}
.option-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.4);
}
.option-card.selected {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(44, 62, 80, 0.3);
}
.option-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #2c3e50;
}
.option-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}
.option-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
    color: #34495e;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    min-height: 2.4em;
}
.navigation-dots {
    display: flex;
    gap: 10px;
    position: absolute;
    bottom: 20px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}
.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}
.game-page {
    background: linear-gradient(135deg, #87ceeb, #b0e2ff, #87ceeb);
    color: #333;
    display: flex;
    flex-direction: column;
    padding: 0;
    justify-content: flex-start;
    user-select: none;
}
.container {
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.game-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: visible;
    padding-bottom: calc(env(safe-area-inset-bottom) + 15px);
}

.board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    overflow: visible;
    position: relative;
    min-height: 0;
    margin-top: 50px;
}
.chessboard {
    width: 85vmin;
    height: 85vmin;
    max-width: 550px;
    max-height: 550px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    border: 5px solid #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: white;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    font-size: calc(85vmin / 8 * 0.9);
    overflow: visible;
}
.square {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    overflow: hidden;
}
.square.white {
    background-color: var(--light-square-bg);
}
.square.black {
    background-color: var(--dark-square-bg);
}
.square.selected {
    background-color: var(--selected-bg);
}
.square.valid-move::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--valid-move-bg);
    opacity: 0.7;
}
.square.capture-move::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: transparent;
    border: 5px solid var(--valid-move-bg);
    box-sizing: border-box;
}
.square.last-move {
    background-color: var(--last-move-bg) !important;
}
.square.check {
    background-color: #ff6b6b !important;
}
.theme-space .square.check {
    background-color: #ff0000 !important;
}
.square.threatened {
    background-color: var(--threatened-bg);
}
.square.protected {
    background-color: var(--protected-bg);
}
.square.hint-from {
    background-color: var(--hint-from-bg) !important;
}
.square.hint-to {
    background-color: var(--hint-to-bg) !important;
}
.piece {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: inherit;
    transition: transform 0.2s;
}

.controls-bottom {
    display: flex;
    justify-content: space-around; 
    align-items: center;
    padding: 10px 5px; 
    background-color: white;
    border-radius: 10px;
    margin-top: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    position: relative;
    z-index: 20;
    gap: 4px;
    flex-wrap: nowrap;
}
.control-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px 4px;
    border-radius: 8px;
    transition: background-color 0.2s;
    position: relative;
    flex: 1; 
    max-width: 80px; 
}

.control-icon:hover {
    background-color: #f0f0f0;
}
.control-icon i {
    font-size: 30px; 
    margin-bottom: 5px;
    color: var(--primary-color);
}
.control-icon span {
    font-size: 11px;
    text-align: center;
    font-weight: 500;
}
.feature-count {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: absolute;
    top: -5px;
    right: -5px;
}
.control-icon.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.control-icon.disabled:hover {
    background-color: transparent;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}
.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: black;
}
.nav-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin: 10px;
    transition: background-color 0.3s;
    font-size: 16px;
}
.nav-button:hover {
    background-color: #1a5a9e;
}
.settings-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.features-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}
.features-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    color: #333;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s;
}
.features-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.features-header h2 {
    color: var(--primary-color);
    margin: 0;
}
.features-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.features-close:hover {
    color: black;
}
.features-section {
    margin-bottom: 25px;
}
.features-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
}
.features-section h3 i {
    margin-right: 10px;
    font-size: 1.2rem;
}
.features-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}
.features-list {
            list-style-type: none; 
            padding: 0;
            margin: 10px 0;
        }
        
        .features-list li {
            margin-bottom: 10px;
            padding: 8px 10px;
            background-color: white;
            border-radius: 5px;
            border-right: 3px solid var(--primary-color);
            transition: all 0.3s ease;
        }
.features-list li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 20px;
}
.theme-space .square.white {
    background-color: #A0A0A0;
}
.theme-space .square.black {
    background-color: #4A4A6C;
}
.theme-space .piece.black {
    color: #F0F0F0;
}
.theme-space .piece.white {
    color: #FFFFFF;
}
.nav-arrows {
    position: fixed;
    bottom: 30px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
    pointer-events: none;
}
.nav-arrow {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}
.nav-arrow:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}
.nav-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}
#pi-payment-modal .modal-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}
#pi-payment-modal h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}
#pi-payment-modal .close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}
#pi-payment-modal .nav-button {
    margin-top: 20px;
    padding: 12px 24px;
    font-size: 16px;
}

.game-info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 550px;
    margin: 0 auto 10px auto;
    padding: 5px 10px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    z-index: 20;
    position: relative;
}
.player-info {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
    z-index: 1;
}
.player-info:last-child {
    margin-left: auto; 
    flex-direction: row-reverse; 
}
.player-info:last-child .player-color-indicator {
    margin-right: 0;
    margin-left: 10px;
}
.top-controls {
    display: flex;
    gap: 5px;
    margin-left: auto; 
}
.player-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
}
.player-white {
    background-color: #f0d9b5;
    border: 2px solid #b58863;
}
.player-black {
    background-color: #b58863;
    border: 2px solid #2c3e50;
}
.game-timer {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.game-timer-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 2px;
}

/* ---- START OF MODIFICATION ---- */
.game-timer-display {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    font-family: monospace;
    background-color: transparent; /* Changed to transparent */
}
/* ---- END OF MODIFICATION ---- */

@media (max-width: 768px) {
    .welcome-title {
        font-size: 2.5rem;
    }
   .welcome-subtitle {
        font-size: 1.4rem;
    }
    .welcome-logo {
        width: 150px;
    }
    .page-title {
        font-size: 2rem;
    }
    .option-card {
        width: 130px;
        height: 180px;
    }
    .option-icon {
        font-size: 2.5rem;
    }
    .option-desc {
        font-size: 0.8rem;
        min-height: 2.2em;
        line-height: 1.1;
    }
    .chessboard {
        width: 90vmin;
        height: 90vmin;
        font-size: calc(90vmin / 8 * 0.9);
    }
/* ---- START OF MODIFICATION ---- */
    .controls-bottom {
        padding: 6px 2px;
        gap: 1px; 
    }
/* ---- END OF MODIFICATION ---- */
    .control-icon {
        padding: 6px 2px; 
        min-width: auto; 
    }
    .control-icon i {
        font-size: 24px;
        margin-bottom: 3px;
    }
    .control-icon span {
        font-size: 10px; 
    }
    
    .nav-arrows {
        padding: 0 15px;
    }
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .feature-count {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }

    .game-timer-label {
        font-size: 10px;
    }
    .game-timer-display {
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .control-icon i {
        font-size: 20px;
    }
    .control-icon span {
        font-size: 9px; 
    }
    .option-card {
        width: 110px;
        height: 160px;
    }
    .option-desc {
        font-size: 0.75rem;
        min-height: 2em;
    }
}

@media (min-width: 769px) {
    .game-container {
        justify-content: center;
    }
    .chessboard {
        width: 60vmin;
        height: 60vmin;
    }
    .game-status {
        height: 30px;
        line-height: 15px;
        margin: 5px auto;
    }
    .board-container {
        margin-top: 20px;
    }
}
@keyframes moveAnimation {
    from { opacity: 0.7; transform: scale(1.1); }
    to { opacity: 1; transform: scale(1); }
}
.piece.moved {
    animation: moveAnimation 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes optionClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.option-card.clicked {
    animation: optionClick 0.3s ease;
}
.timer-container {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    display: none;
}
.timer-label {
    font-size: 12px;
    margin-bottom: 4px;
    color: #666;
    display: none;
}
.timer-display {
    font-size: 16px;
    color: #2c3e50;
    display: none;
}
.timer-low {
    color: #f44336;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
.difficulty-time-info {
    font-size: 12px;
    margin-top: 5px;
    color: #666;
}

.top-controls .control-icon {
    min-width: 45px;
    padding: 4px 3px;
}
.game-status {
    background-color: transparent;
    box-shadow: none;
    border-radius: 10px;
    padding: 5px;
    margin-top: 5px;
    text-align: center;
    font-weight: bold;
    max-width: 550px;
    margin: 5px auto;
    height: 30px;
    line-height: 30px;
    overflow: hidden;
    display: block;
}
.game-over-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}
.game-over-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
}
.game-over-buttons {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    flex-wrap: wrap;
}
/* New styles for enhanced threats */
.square.low-threat {
    background-color: var(--low-threat-bg) !important;
}
.square.medium-threat {
    background-color: var(--medium-threat-bg) !important;
}
.square.high-threat {
    background-color: var(--high-threat-bg) !important;
    animation: pulse-danger 1s infinite;
}
.square.potential-threat {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        var(--potential-threat-bg) 5px,
        var(--potential-threat-bg) 10px
    );
}
.square.defended {
    box-shadow: inset 0 0 0 3px var(--protected-bg);
}
.threat-source {
    box-shadow: 0 0 0 3px #ff0000;
    animation: pulse-threat 2s infinite;
}
.threat-arrow {
    position: absolute;
    background-color: rgba(255, 0, 0, 0.7);
    z-index: 5;
    pointer-events: none;
}
.threat-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}
.threat-info-title {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 18px;
}
.threat-info-content {
    margin-bottom: 10px;
}
.threat-info-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.threat-info-list li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}
.threat-info-list li:last-child {
    border-bottom: none;
}
.threat-tip {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-style: italic;
    border-left: 3px solid var(--primary-color);
}
.threat-level-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}
.threat-level-low {
    background-color: var(--low-threat-bg);
}
.threat-level-medium {
    background-color: var(--medium-threat-bg);
}
.threat-level-high {
    background-color: var(--high-threat-bg);
}
.threat-level-potential {
    background: repeating-linear-gradient(
        45deg,
        var(--potential-threat-bg),
        var(--potential-threat-bg) 5px,
        #ffffff 5px,
        #ffffff 10px
    );
}
@keyframes pulse-danger {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}
@keyframes pulse-threat {
    0% { box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.7); }
    50% { box-shadow: 0 0 0 6px rgba(255, 0, 0, 0.4); }
    100% { box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.7); }
}
/* Advice modal styles */
.advice-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}
.advice-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    color: 333;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s;
}
.advice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.advice-header h2 {
    color: var(--primary-color);
    margin: 0;
}
.advice-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.advice-close:hover {
    color: black;
}
.advice-section {
    margin-bottom: 25px;
}
.advice-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
}
.advice-section h3 i {
    margin-right: 10px;
    font-size: 1.2rem;
}
.advice-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}
.advice-list {
    list-style-type: none;
    padding-left: 20px;
    margin-top: 10px;
}
.advice-list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px;
}
.advice-list li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 20px;
}
.advice-tip {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-style: italic;
    border-left: 3px solid var(--primary-color);
}
@media (max-width: 768px) {
    .advice-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
}
/* Promotion Modal Styles */
.promotion-options {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}
.promotion-options button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    font-size: 1.2rem;
    background: var(--light-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}
.promotion-options button:hover {
    background: var(--primary-color);
    color: white;
}
.promotion-options span {
    font-size: 3rem;
    margin-bottom: 5px;
}
#promotion-modal .options-container {
    flex-wrap: wrap;
    justify-content: center;
}
#promotion-modal .option-card {
    width: 100px;
    height: 150px;
}
#promotion-modal .option-icon {
    font-size: 2.5rem;
}
#promotion-modal .option-name {
    font-size: 1rem;
}
@media (max-width: 480px) {
    #promotion-modal .option-card {
        width: 80px;
        height: 120px;
    }
    #promotion-modal .option-icon {
        font-size: 2rem;
    }
    #promotion-modal .option-name {
        font-size: 0.9rem;
    }
}

/* Statistics Modal Styles - MODIFIED FOR SCROLLABLE CONTENT */
.stats-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    color: #333;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s;
    text-align: center;
}

.stats-scrollable-content {
    max-height: calc(80vh - 150px);
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 20px;
}

/* Custom scrollbar for stats modal */
.stats-scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.stats-scrollable-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.stats-scrollable-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.stats-scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #1a5a9e;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
    padding: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.stat-label {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.stat-value {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 16px;
}

#stats-back-btn {
    margin-top: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .stats-content {
        width: 95%;
        max-width: 350px;
        margin: 5% auto;
        padding: 15px;
    }
    
    .stat-item {
        padding: 8px 12px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .stat-value {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stats-content {
        width: 95%;
        max-width: 320px;
        margin: 10% auto;
        padding: 15px;
    }
    
    .stat-item {
        padding: 6px 10px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 13px;
    }
}

/* Enhanced Statistics Styles */
.stats-tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.stats-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.stats-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.difficulty-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.diff-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: white;
    border-radius: 5px;
    margin-bottom: 5px;
}

.diff-label {
    font-weight: bold;
    color: #2c3e50;
}

.diff-value {
    color: var(--primary-color);
    font-weight: bold;
}

/* Enhanced stat items for better readability */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background-color: #f0f0f0;
    transform: translateX(5px);
}

.stat-label {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.stat-value {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 16px;
}

/* Responsive design for statistics */
@media (max-width: 768px) {
    .stats-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-button {
        text-align: center;
        padding: 8px;
    }
    
    .difficulty-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        padding: 10px;
    }
    
    .stat-item {
        padding: 8px 10px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .stat-value {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stats-content {
        width: 95%;
        max-width: 320px;
        margin: 10% auto;
        padding: 15px;
    }
    
    .stats-tabs {
        margin-bottom: 15px;
    }
    
    .tab-button {
        font-size: 12px;
        padding: 6px 8px;
    }
}
