/* ------------------- NEW RESULT CONTAINER STYLES ------------------- */
.result-container {
    display: none;
    width: 100%;
    margin: 10px auto;
    background: rgba(0, 20, 40, 0.7);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(0, 204, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.2);
    backdrop-filter: blur(5px);
}

.rs-left, .rs-right {
    width: 20%;
    height:auto;
    display: flex;
    margin:  0 10px;
    flex-direction: column;
    justify-content: center;
    padding: 100px;
    align-items: center;
    background: rgba(0, 30, 60, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 204, 255, 0.2);
}

.rs-cen {
    width: 60%;
    display: block;
    background: rgba(0, 30, 60, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 204, 255, 0.2);
    padding: 10px;
    margin: 0 10px;
}

.result-container.show {
    display: flex;
    flex-direction: row;
    text-align: center;
    justify-content: space-between;
    align-items: flex-start;
}

.container.hide {
    display: none;
}

.result-statTop {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    background-color: rgba(0, 30, 60, 0.5);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 204, 255, 0.2);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.result-stat {
    display: flex;
    background: rgba(0, 30, 60, 0.5);
    padding: 15px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid rgba(0, 204, 255, 0.2);
}

.result-stat-valuetTop {
    font-size: 4rem;
    font-weight: bold;
    color: #00ccff;
    margin: 10px 0;
    font-family: 'DS-Digital', sans-serif;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.3);
}

.result-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #00ccff;
    margin: 5px 0;
    font-family: 'DS-Digital', sans-serif;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.3);
}

.result-stat-label {
    color: #87e7ff;
    font-size: 0.9rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.1rem;
}

.btnc {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 40%;
}

.btn {
    display: flex;
    gap: 10px;
    width: 40%;
    grid-row: auto;
    color: #00ccff;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: rgba(0, 30, 60, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 204, 255, 0.2);
}

.btnn {
    min-width: 40px;
    height: 30px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #87e7ff;
    background: rgba(0, 204, 255, 0.1);
    border: 1px solid rgba(0, 204, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
}

.btnn:hover {
    background: rgba(0, 204, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.2);
    transform: translateY(-2px);
}

.btnn:active {
    transform: translateY(0);
}

.fastest-words {
    margin-top: 20px;
    align-items: center;
    display: flex;
    flex-direction: column;
    background: rgba(0, 30, 60, 0.5);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 204, 255, 0.2);
}

.word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}

.word-item {
    background: rgba(0, 204, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 204, 255, 0.2);
    color: #87e7ff;
}

.graph-container {
    margin-top: 30px;
    background: rgba(0, 30, 60, 0.5);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 204, 255, 0.2);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

#topResultsContainer {
    margin-top: 30px;
    background: rgba(0, 30, 60, 0.5);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 204, 255, 0.2);
}

#topResultsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    table-layout: fixed;
}

#topResultsTable th, #topResultsTable td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 204, 255, 0.2);
    word-break: break-word;
}

#topResultsTable th {
    background-color: rgba(0, 30, 60, 0.7);
    color: #00ccff;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.1rem;
}

#topResultsTable tr:nth-child(even) {
    background-color: rgba(0, 30, 60, 0.3);
}

#topResultsTable tr:hover {
    background-color: rgba(0, 204, 255, 0.1);
}

.timing-stats {
    display: flex;
    font-family: 'Poppins', sans-serif;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    background: rgba(0, 30, 60, 0.5);
    border: 1px solid rgba(0, 204, 255, 0.2);
    color: #87e7ff;
}

.timing-stats h3 {
    margin-top: 0;
    color: #00ccff;
    border-bottom: 1px solid rgba(0, 204, 255, 0.2);
    padding-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.1rem;
}

.timing-table {
    width: 100%;
    border-collapse: collapse;
}

.timing-item td {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 204, 255, 0.1);
}

.timing-item td:first-child {
    font-weight: bold;
    color: #87e7ff;
}

.timing-item td:last-child {
    text-align: right;
    color: #00ccff;
    font-family: 'Orbitron', sans-serif;
}

.timing-item:last-child td {
    border-bottom: none;
}

/* ------------------- RESPONSIVE RESULT CONTAINER ------------------- */
    @media (max-width: 1200px) {
        .result-container {
            flex-direction: column;
            align-items: stretch;
        }
        
        .rs-left, .rs-cen, .rs-right {
            width: 100% !important;
            margin: 10px 0;
        }
        
        .result-stats {
            grid-template-columns: 1fr 1fr;
        }
        
        .result-stat-value {
            font-size: 1.8rem;
        }
        
        .result-stat-valuetTop {
            font-size: 3.5rem;
        }
    }

    @media (max-width: 992px) {
        .rs-left, .rs-cen, .rs-right{
            width: 100% !important;
            margin: 10px 0;
        }
        .result-stats {
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        
        .result-stat {
            padding: 10px;
        }
        
        .result-stat-value {
            font-size: 1.6rem;
        }
        
        .result-stat-valuetTop {
            font-size: 3rem;
        }
        
        .graph-container canvas {
            max-height: 300px;
        }
        
        #topResultsTable {
            font-size: 14px;
        }
    }

    @media (max-width: 768px) {
        .result-container {
            flex-direction: column;
            padding: 15px;
        }
        
        .result-stats {
            grid-template-columns: 1fr;
        }
        
        .result-stat-value {
            font-size: 1.8rem;
        }
        
        .result-stat-valuetTop {
            font-size: 2.5rem;
        }
        
        .timing-stats,
        .fastest-words,
        .graph-container,
        #topResultsContainer {
            margin-top: 15px;
            padding: 15px;
        }
        
        .btnc {
            width: 60%;
        }
        
        #topResultsTable th, 
        #topResultsTable td {
            padding: 6px 8px;
        }
    }

    @media (max-width: 576px) {
        .result-container {
            padding: 10px;
        }
        
        .result-stat-value {
            font-size: 1.5rem;
        }
        
        .result-stat-valuetTop {
            font-size: 2rem;
        }
        
        .result-stat-label {
            font-size: 0.8rem;
        }
        
        .word-item {
            padding: 5px 8px;
            font-size: 0.75rem;
        }
        
        .btnc {
            width: 80%;
        }
        
        .btn {
            width: 100%;
        }
        
        #topResultsTable {
            display: block;
            overflow-x: auto;
            white-space: nowrap;
        }
        
        .timing-table {
            font-size: 14px;
        }
    }

    @media (max-width: 400px) {
        .result-stat-value {
            font-size: 1.3rem;
        }
        
        .result-stat-valuetTop {
            font-size: 1.8rem;
        }
        
        .result-stat-label {
            font-size: 0.7rem;
        }
        
        .btnc {
            width: 100%;
        }
        
        .timing-table {
            font-size: 13px;
        }
        
        .word-item {
            padding: 4px 6px;
            font-size: 0.7rem;
        }
    }