.game-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 10px;
}

.game-title {
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    padding: 8px 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.game-title .glyphicon {
    font-size: 22px;
    margin-right: 8px;
    color: #42a5f5;
}

.level-info {
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    color: #ff9800;
    padding: 10px;
    border-radius: 10px;
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.level-info .glyphicon {
    margin-right: 6px;
    font-size: 15px;
}

.stat-panel {
    /*background: #1e1e1e;*/
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
}

.stat-item {
    font-size: 15px;
    color: #f0f0f0;
    font-weight: 500;
}

.stat-item .glyphicon {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
    color: #42a5f5;
}

.grid-container {
    flex: 1;
    /*background: #1a1a1a;*/
    border-radius: 15px;
    padding: 12px;
    display: grid;
    gap: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 2px solid #3a3a3a;
    background-image: linear-gradient(#3a3a3a 1px, transparent 1px), linear-gradient(90deg, #3a3a3a 1px, transparent 1px);
    background-size: calc(100% / var(--grid-size)), calc(100% / var(--grid-size));
}

.grid-item {
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.28s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
    background: transparent;
    opacity: 0;
    color: #fff;
    border: 1px solid #3a3a3a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.05);
    width: 100%;
    height: 100%;
    transform: none !important;
}

.grid-item.active {
    opacity: 1;
    border-color: currentColor;
    box-shadow: 0 0 12px currentColor, inset 0 1px 3px rgba(255, 255, 255, 0.2);
    transform: none !important;
}

.grid-item.disabled {
    opacity: 1;
    background: #424242;
    border-color: #616161;
    color: #9e9e9e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: none !important;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
}

.game-btn {
    padding: 11px 32px;
    font-size: 16px;
    border-radius: 10px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: none;
}

.game-btn .glyphicon {
    margin-right: 6px;
}

.start-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-box {
    background: #1e1e1e;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border: 1px solid #333;
}

.start-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #ffffff;
}

.start-title .glyphicon {
    color: #42a5f5;
    margin-right: 8px;
}

.type-option {
    display: block;
    margin: 12px 0;
    font-size: 16px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
    color: #e0e0e0;
}

.type-option:hover {
    background: #2d2d2d;
}

.countdown-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border: 2px solid #444;
    line-height: 1;
    pointer-events: none;
}

.result-item {
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px dashed #333;
    color: #1b0e04;
    font-weight: bold;
}

.result-item .glyphicon {
    margin-right: 8px;
    width: 20px;
    text-align: center;
    color: #42a5f5;
}

.close {
    color: #fff !important;
    text-shadow: none;
    opacity: 0.8;
}