/* ================================
   Level Select Screen
   ================================ */

#level-screen {
    justify-content: center;
    /* Center horizontally */
    align-items: flex-start;
    /* Start from top */
    background: transparent;
    /* Transparent so it shows container bg */
}

.level-screen-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Page Arrow Buttons */
.page-arrow-btn {
    width: 90px;
    height: 90px;
    min-width: 90px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 153, 0, 0.459);
    color: #555;
    font-size: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    z-index: 10;
}

.page-arrow-btn:hover {
    background: rgba(255, 145, 0, 0.659);
    color: #333;
}

.page-arrow-btn:active {
    transform: scale(0.95);
    background: rgba(255, 145, 0, 0.659);
}

.screen-title {
    font-size: 42px;
    margin: 20px 0;
    flex-shrink: 0;
    background: linear-gradient(to bottom, #9b59b6, #8e44ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.2));
    text-transform: uppercase;
}

.levels-grid {
    display: grid;
    /* 5 columns for portrait */
    grid-template-columns: repeat(5, 160px);
    row-gap: 8px;
    column-gap: 8px;
    overflow-y: auto;
    padding: 20px;
    height: 100%;
    justify-content: center;
    align-content: start;
    margin-top: 150px;
}

/* Custom Scrollbar */
.levels-grid::-webkit-scrollbar {
    width: 8px;
}

.levels-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.levels-grid::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.level-card {
    background: #3498db;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 3px solid #2980b9;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.level-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.level-card:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.level-card.locked {
    background: #95a5a6;
    border-color: #7f8c8d;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.8;
}

.level-card.completed {
    background: #2ecc71;
    border-color: #27ae60;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.level-card.completed:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* New Card Contents */

.card-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-content.number-mode {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
}

.big-number {
    font-size: 60px;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.level-number-small {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.7);
}

.tap-to-play {
    font-size: 45px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    margin-top: 5px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 8px;
}

.level-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.level-info-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px;
    text-align: center;
    display: none;
    /* Hide unless we want to show stars later */
}

.check-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #2ecc71;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lock-icon {
    font-size: 90px;
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.3));
    z-index: 2;
}

/* Responsive Grid adjustment - Removed for fixed resolution scaling */
/* Media queries removed to force 16:9 layout consistency */