* {
    touch-action: manipulation;
}

h1 {
    color: #4b5320;
    margin-bottom: 24px;
    margin-top: 10px;
}

h2 {
    font-size: 24px;
    color: #4b5320;
    margin-bottom: 5px;
    margin-top: 5px;
}

h3 {
    font-size: 20px;
    color: #4b5320;
    margin-bottom: 0px;
    margin-top: 5px;
}

body {
    font-family: Arial, sans-serif;
    background: #f3d7fe;
    /* background: #e2f5dc; */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.button-link {
    background: #e6e2af;
    color: #4b5320;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
    padding: 10px 24px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.button-link:hover {
    background: #b6d7a8;
}

.button-link:active {
    background: #b6d7a8;
    transform: translateY(2px) scale(0.98);
}

.button-link:disabled {
    background: #dddddd;
    color: #aaaaaa;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.button-row {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: center;
    align-items: center;
    
}

.game-logo {
    height: 200px;
    width: 628px;
    margin: 0 auto;
    margin-top: -60px;
    display: block;
}

.ls-game-outer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vw;
    min-height: 0;
    flex: 1;
    margin-top: -15px;
    margin-bottom: 10px;
    max-height: 550px;
}

.ls-game-layout {
    display: flex;
    flex-direction: row;
    width: 100vw;
    min-height: 0;
    flex: 1;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    max-width: 1200px;
}

.ls-side-pane {
    min-width: 350px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    z-index: 1;
    padding: 10px 10px 0px 10px;
    
}

.ls-side-pane.left-pane {
    border: 1px solid #d6d3b7;
}

.ls-side-pane.right-pane {
    border: 1px solid #d6d3b7;
}

.ls-center-pane {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 350px;
    z-index: 2;
}

.ls-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
    padding-bottom: 0px;
}

.word-grid {
    display: flex;
    flex-direction: row;
    gap: 8px;
    background: #ffffff;
    padding: 0px 8px 2px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    min-height: 72px;
    align-items: center;
    min-width: 0px;
    transition: width 0.2s;
}
.word-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #2d2d2d;
    background: #e6e2af;
    padding: 10px 16px 10px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
    user-select: none;
}
.letter-grid {
    display: grid;
    grid-template-columns: repeat(4, 60px);
    grid-template-rows: repeat(4, 60px);
    gap: 8px;
    background: #ffffff;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.letter-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #2d2d2d;
    background: #e6e2af;
    border-radius: 8px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
    user-select: none;
}
.letter-cell:hover {
    background: #b6d7a8;
}
.letter-cell-empty {
    background: #b6d7a8;
}

.character-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    /* border: 1px solid black; */
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 10px;
}

.character-name {
    text-align: center;
    width: 100%;
    display: block;
}

.character-row-blur-lose {
    background-color: rgba(230, 167, 255, 0.5);
    color: #800080;
    filter: blur(1px);
    /* backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px); */
}

.character-row-blur-win {
    background-color: rgba(167, 255, 186, 0.5);
    color: #227543;
    filter: blur(1px);
    /* backdrop-filter: blur(1px); */
    /* -webkit-backdrop-filter: blur(1px); */
}

.character-row-blur {
    font-size: 100px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.character-row {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    /* border: 1px solid black; */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    /* margin: 8px; */
    position: relative;
    border: 1px solid #800080;
}

.character-info {
    min-width: 120px;
    max-width: 180px;
    flex: 0 0 auto;
    padding: 8px;
    z-index: 5;
}

.character-sprite {
    height: 150px;
}

.character-sprite-container {
    display: flex;
    flex: 1 1 auto;
    padding: 8px;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    margin-top: 10px;
    /* border: 1px solid black; */
}

.character-left {
    transform: scaleX(-1);
}

.character-right {
    transform: scaleX(1);
}

/* Fireworks container */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.fireworks-container.fade-in {
    opacity: 1;
}

.fireworks-message {
    position: fixed;
    top: 200px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}
