.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Win Screen */
#win-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#win-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.win-content {
    text-align: center;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--win-gradient);
    color: #5d4037;
    border: 4px solid #8d6e63;
    position: relative;
    z-index: 10;
}

#win-screen.hidden .win-content {
    transform: scale(0.8);
}

button {
    background: #8d6e63;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    box-shadow: 0 4px 0 #5d4037;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #5d4037;
}

button:hover {
    background: #a1887f;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #5d4037;
}

button:active:hover {
    transform: translateY(4px);
    box-shadow: 0 0 0 #5d4037;
}

#reset-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-left: 10px;
    background: #ef5350;
    /* Reddish for reset */
    box-shadow: 0 4px 0 #c62828;
}

#reset-btn:hover {
    background: #e57373;
    box-shadow: 0 6px 0 #c62828;
}

#reset-btn:active {
    box-shadow: 0 0 0 #c62828;
}

/* HUD Stats */
#hud-stats {
    display: flex;
    gap: 16px;
    margin-right: 10px;
}

#hud-stats.hidden {
    display: none;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-label {
    opacity: 0.7;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#timer-display,
#mistakes-display {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    min-width: 45px;
    text-align: right;
    letter-spacing: 1px;
}

#mistakes-display {
    min-width: 10px;
    /* Mistakes is usually single digit */
    text-align: center;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

#settings-btn {
    padding: 8px;
    background: transparent;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

#settings-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    color: #fff;
}

/* Settings Modal */
#settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#settings-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#settings-modal .modal-content {
    width: 90%;
    max-width: 400px;
    background: var(--modal-gradient);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#settings-modal.hidden .modal-content {
    transform: translateY(20px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
}

.icon-btn {
    background: transparent;
    padding: 5px;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.6);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: none;
    box-shadow: none;
}

.settings-group {
    margin-bottom: 25px;
}

.settings-group h3 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--color-3);
    /* Muted Green */
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Themes Placeholder */
.themes-placeholder {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.themes-placeholder p {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Theme Selector */
.theme-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 0.9rem;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #fff;
}

.theme-btn.active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#hud-share-btn {
    margin-left: 10px;
    padding: 4px;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.7);
}

#hud-share-btn:hover {
    opacity: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}