#root {
    text-align: center;
    max-width: 28rem;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 1rem;
}

.controls {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#solve-button-container {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.video-container {
    position: relative;
    max-width: 25rem;
    margin: 0 auto;
}

.video-preview, .snapshot-canvas {
    max-width: 100%;
    aspect-ratio: 1 / 1; /* Makes the element square */
    object-fit: cover;
}

#results {
    margin-top: 1rem;
    text-align: left;
}

.canvas-preview {
    max-width: 100%;
}

#boggle-board-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    position: sticky;
    top: 0;
    background: white;
}

#boggle-board {
    display: none;
    gap: 2%;
    width: 75%;
    aspect-ratio: 1 / 1; /* Makes the element square */
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem;
    border-radius: 1rem;
}

.boggle-tile {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

.tile-text {
    color: #ccc;
}

.tile-input {
    width: 100%;
    height: 100%;
    font-size: inherit;
    text-align: center;
    border: none;
    outline: none;
    background: transparent;
    font-weight: bold;
}

.highlight  {
    color: #000;
}

.animation-highlight {
    transform: scale(1.15);
    text-shadow: 0 0 8px #3498db;
    transition: all 0.2s ease-in-out;
}

/* capture button at bottom in middle, styled as a big circle */
#capture-ocr {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 5rem;
    height: 5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

#capture-ocr-icon {
    pointer-events: none;
    user-select: none;
    width: 80%;
    /* keep aspect ratio */
    height: auto;
    opacity: 0.75;
}

#capture-ocr:active {
    background: rgba(200, 200, 200, 0.8);
}

#path-canvas {
    width: 0px;
    height: 0px;
    opacity: 0.5;
    pointer-events: none;
}

button {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

h2 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

select {
    padding: 0.25rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #ccc;
}

#instructions {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.word-list {
    line-height: 1.5;
}

.word {
    /* is clickable, style like a link */
    cursor: pointer;
    color: #3498db;
    text-decoration: underline;
}

#timer {
    font-size: 1.8rem;
    font-weight: bold;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    /* flex gap */
    gap: 0.5rem;
}

.top-details {
    margin-top: 0.75rem;
}

#timer-instructions {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

h1 {
    margin-bottom: 1rem;
}

#current-path-info {
    display: none;
    align-items: center;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    justify-content: center;
    gap: 1rem;
}

#highlighted-word {
    font-size: 1.5rem;
    font-weight: bold;
}