body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f0f0f0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjZjBmMGYwIj48L3JlY3Q+CjxwYXRoIGQ9Ik0wIDVMNSAwWk02IDRMNCA2Wk0tMSAxTDEgLTFaIiBzdHJva2U9IiNlMGUwZTAiIHN0cm9rZS13aWR0aD0iMSI+PC9wYXRoPgo8L3N2Zz4=');
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: #333;
}

body, button {
  touch-action: manipulation;
}

/* Prevent text and image selection throughout the game */
.game-container,
.game-board,
.die,
.logo,
.win-image,
img,
svg {
    -webkit-user-select: none;  /* Safari */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* IE/Edge */
    user-select: none;          /* Standard syntax */
    -webkit-user-drag: none;    /* Safari - prevents image dragging */
    -khtml-user-drag: none;     /* Old browsers */
    -moz-user-drag: none;       /* Firefox */
}

/* Prevent text selection on buttons but keep them clickable */
.controls button,
.play-again-button,
.start-button,
.screenshot-button,
.mute-button,
.instructions-toggle {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
}

h1 {
    margin-bottom: 10px;
    color: #444;
}

a {
    color: #db7373;
}

.game-container {
    width: 100%;
    max-width: 900px; /* Keeping this for overall container max width */
    margin: 0 auto;
    text-align: center;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-board {
    margin: 20px auto 0 auto;
    /* Remove fixed width/height to allow dynamic sizing */
    /* width and max-width will be set dynamically by JS */
    background-color: #e6e6e6;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+CjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2U2ZTZlNiI+PC9yZWN0Pgo8cGF0aCBkPSJNMCAyMEwyMCAwWk0xMCAxMEwwIDBNMTAgMTBMMjAgMjBNMTAgMTBMMjAgME0xMCAxMEwwIDIwIiBzdHJva2U9IiNkZGRkZGQiIHN0cm9rZS13aWR0aD0iMC41Ij48L3BhdGg+Cjwvc3ZnPg==');
    touch-action: none; /* Disable browser handling of touch events for custom gestures */
    border: 3px solid transparent; /* Default transparent border */
    transition: border-color 0.3s ease-in-out;
}

.game-board.daily-mode {
    border-color: #39BA4F; /* Green border for daily puzzle */
}

.game-board.practice-mode {
    border-color: #333; /* Black border for practice puzzle */
}

/* Tab-style mode indicators */
.mode-tabs {
    display: flex;
    justify-content: center;
    margin-top: 0; /* Butt right up against the game board */
    position: relative;
    z-index: 2;
}

.mode-tab {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 0 0 8px 8px;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 2px;
}

.mode-tab.daily {
    background-color: #39BA4F;
    color: white;
}

.mode-tab.daily.active {
    background-color: #39BA4F;
    color: white;
    box-shadow: 0 -2px 8px rgba(57, 186, 79, 0.3);
}

.mode-tab.practice {
    background-color: #333;
    color: white;
}

.mode-tab.practice.active {
    background-color: #333;
    color: white;
    box-shadow: 0 -2px 8px rgba(51, 51, 51, 0.3);
}

.mode-tab:not(.active) {
    opacity: 0.7;
    transform: translateY(2px);
}

.mode-tab:not(.active):hover {
    opacity: 0.9;
    transform: translateY(1px);
}


.die {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: #fff9e6;
    border: 2px solid #e0d5c1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    cursor: move;
    user-select: none;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s, box-shadow 0.1s, opacity 0.3s ease-in-out !important;
    z-index: 1;
}

.die:hover {
    transform: scale(1.05);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.15);
}

.die:active {
    transform: scale(1.1);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.die.valid-word {
    /* Remove outline and add green background tint instead */
    outline: none;
    background-color: rgba(57, 186, 79, 1); /* PINK */
}

/* Remove any existing invalid-word styles if present */
.die.invalid-word {
    outline: none;
    /* No special styling for invalid words */
}

.mode-indicator {
    margin-top: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #4a5568;
    padding: 8px 0;
}

.controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

button {
    padding: 10px 16px;
    font-size: 12px;
    background-color: #a23a26;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #811d0a;
}

#mode-switch-button {
    background-color: #4a9f5e;
}

#mode-switch-button:hover {
    background-color: #3a8f4e;
}

.logo {
    margin: 20px auto 0px auto;  /* Add margin to top AND bottom */
    display: block;  /* Ensure it's a block element */
}

.status {

}

.instructions-toggle {
    margin-top: 10px;
    color: #a23a26;
    text-decoration: underline;
    cursor: pointer;
}

.instructions {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 10px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.instructions.show {
    display: block;
}

.instructions ul {
    margin-top: 10px;
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
}

.word-indicators {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.die.selected {
    border: 2px solid white !important;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.selection-box {
    position: absolute;
    border: 2px dashed #a23a26;
    background-color: rgba(51, 122, 183, 0.15);
    pointer-events: none;
    z-index: 100;
}

@media (max-width: 768px) {
    .selection-box {
        border: 1px dashed #a23a26;
        background-color: rgba(51, 122, 183, 0.25);
    }
}

/* Completion Panel */
.completion-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    max-width: 300px;
    overflow: hidden;
}

.completion-panel.collapsed {
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.completion-panel.collapsed:hover {
    background-color: rgba(57, 186, 79, 0.1);
}

.completion-panel.expanded {
    width: 300px;
    min-height: 200px;
}

.completion-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #39BA4F, #2d8f3f);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.completion-panel-header:hover {
    background: linear-gradient(135deg, #4ac85f, #3a9f4f);
}

.completion-panel-header.practice-mode {
    background: linear-gradient(135deg, #333333, #000000);
}

.completion-panel.collapsed .completion-panel-header {
    padding: 0;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.completion-panel-title {
    font-size: 16px;
    margin: 0;
}

.completion-panel.collapsed .completion-panel-title {
    display: none;
}

.completion-panel-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* Mute button in completion panel */
.completion-panel-content .mute-button {
    background: white;
    border: none;
    cursor: pointer;
    padding: 1px;
    border-radius: 12px;
    transition: background-color 0.2s ease;
    color: black;
    position: absolute;
    top: 25px;
    right: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.completion-panel-content .mute-button:hover {
    background-color: #f0f0f0;
}

.completion-panel-content .mute-button svg {
    width: 16px;
    height: 16px;
}

.completion-panel.collapsed .completion-panel-toggle {
    transform: rotate(180deg);
}

.completion-panel-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.completion-panel.collapsed .completion-panel-content {
    display: none;
}

.completion-time {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #39BA4F;
    margin: 0;
}

.completion-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
    margin: 10px 0;
}

/* Center single stat for practice puzzles */
.completion-stats:has(.completion-stat:only-child) {
    grid-template-columns: 1fr;
    justify-items: center;
}

.completion-stat {
    text-align: center;
    flex: 1;
}

.completion-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.completion-stat-label {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.completion-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.completion-action-button {
    background: #39BA4F;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.completion-action-button:hover {
    background: #2d8f3f;
}

.completion-action-button.secondary {
    background: #666;
}

.completion-action-button.secondary:hover {
    background: #555;
}

/* WIN SCREEN LAYOUT */
.win-results-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.screenshot-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.button-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    align-items: stretch;
}

.screenshot-button {
    width: 100%; /* Match width of screenshot */
}

/* Time overlay on bird image */
.win-time {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 8px;
    z-index: 5;
}

/* Footer promo text */
.win-footer-text {
    color: #ccc;
    font-size: 16px;
    margin-top: 40px;
    text-align: center;
    font-weight: bold;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}


/* Win overlay */
.win-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.win-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.win-image {
    max-width: 80%;
    max-height: 50vh;
    margin-bottom: 20px;
}

.win-time {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.play-again-button {
    padding: 15px 30px;
    font-size: 18px;
    background-color: #a23a26;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-again-button:hover {
    background-color: #811d0a;
    transform: scale(1.05);
}

/* Timer display */
.timer-display {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
    color: #5D4037;
    display: none;
}

.win-thumbnail {
    opacity: 0;
    transition: opacity 0.5s ease;
    max-width: 90%;
    max-height: 200px;
    margin-top: 10px;
    border: 3px solid white;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
}

/* Add or update for win-thumbnail and win-image animation */

.win-thumbnail, .win-image {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.win-thumbnail.show, .win-image.show {
    opacity: 1;
    transform: scale(1);
}

/* Make sure .logo doesn't stretch awkwardly */
.logo {
    margin: 20px auto 0px auto;
    display: block;
    height: 150px;
    width: auto;
    transition: margin-left 0.4s ease;  /* Add smooth transition */
}

.win-time {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 8px;
    margin-top: -80px; /* Pull up to overlap image */
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.screenshot-buttons-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.screenshot-button {
    margin-top: 15px;
    margin-left: 10px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #a23a26;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-weight: bold;
}
.screenshot-button:hover {
    background-color: #811d0a;
}


.start-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background-color: rgba(255, 255, 255, 1);
}

.start-button {
    font-size: 32px;
    padding: 20px 40px;
    background-color: #39BA4F;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.2s;
}

.start-button:hover {
    background-color: #28933a;
    transform: scale(1.05);
}

.word-balloon {
    position: absolute;
    left: 0;
    top: 30%;
    transform: translate(-100%, -50%) scale(0.85);
    background: white;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    z-index: 10;
}

.word-balloon.show {
    opacity: 1;
    transform: translate(-100%, -50%) scale(1);
}

.win-image-wrapper {
    position: relative;
    display: inline-block;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
}

.live-timer-balloon {
    position: absolute;
    left: 20px;
    top: 40%;
    transform: translate(-110%, -50%) scale(0.85);
    background: white;
    color: #333;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Segoe UI', sans-serif;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    z-index: 10;
}

.live-timer-balloon::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid white;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.live-timer-balloon.show {
    opacity: 1;
    transform: translate(-110%, -50%) scale(1);
}


.live-timer-balloon::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -18px;
    transform: translateY(-50%) rotate(5deg);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 22px solid white;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0));
}

/* Boundary indicator styling - removed but keeping the class definition */
.boundary-indicator {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

/* Touch instructions for mobile */
.touch-instructions {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: none;
}

.connecting-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    stroke-width: 3;
    transition: opacity 0.3s ease-in-out;
}   

@keyframes wormWiggleHorizontal {
  0%, 100% { transform: translateY(0); }
  25%      { transform: translateY(-1px); }
  75%      { transform: translateY(1px); }
}

@keyframes wormWiggleVertical {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-1px); }
  75%      { transform: translateX(1px); }
}

.die.valid-wiggle-h {
  animation: wormWiggleHorizontal 1s ease-in-out infinite;
}

.die.valid-wiggle-v {
  animation: wormWiggleVertical 1s ease-in-out infinite;
}

/* Pink rip particles */
/* Pink rip particles - each is an absolutely positioned circle that expands/fades */
.rip-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: rgba(55, 187, 87, 0.85); /* pinkish color */
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999; /* ensure it's on top */

  /* The "launch" animation is defined below. 
     We pass random dx/dy via CSS variables: --dx, --dy. */
  animation: ripParticleFly 0.3s ease-out forwards;
  /* We'll center the circle at the given (x, y) by shifting -50% of its size 
     so it spawns from the middle, then it travels outward to var(--dx), var(--dy). */
  transform: translate(-50%, -50%);
}

@keyframes ripParticleFly {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.1);
    opacity: 0;
  }
}

.mute-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: background-color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mute-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.mute-button svg {
    width: 50%;
    height: 50%;
    color: #000000;
}

.mute-button.muted .sound-wave {
    display: none;
}

.mute-button.muted .mute-line {
    display: block;
}

/* Hide controls initially, they will be shown when game starts */
.controls {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.controls.show {
    opacity: 1;
    visibility: visible;
}


/* Grid styles */
.grid-layer {
    pointer-events: none;
    z-index: 0;
}

.grid-cell {
    transition: background-color 0.2s ease;
}

.grid-cell.valid-drop {
    background-color: rgba(220, 255, 220, 0.3);
    border: 1px dashed rgba(100, 200, 100, 0.8);
}

.grid-cell.invalid-drop {
    background-color: rgba(255, 220, 220, 0.3);
    border: 1px dashed rgba(200, 100, 100, 0.8);
}

/* Add grid toggle button */
.grid-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    z-index: 10;
    border: 1px solid #ccc;
    transition: background-color 0.2s;
}

.grid-toggle:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.die-ghost {
    position: absolute;
    background-color: rgba(240, 240, 240, 0.3);
    border: 2px dashed rgba(200, 200, 200, 0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: rgba(150, 150, 150, 0.4);
    pointer-events: none;
    z-index: 0;
}

/* Desktop specific styles. */
@media (min-width: 769px) {
    /* Desktop */
    .game-board {
        min-height: 540px; /* Ensure enough height for 9 rows */
        min-width: 700px; /* Ensure enough width for 11 cols */
    }
    
    .mute-button {
        position: absolute;
        top: 15px;
        right: 13px;
        width: 60px;
        height: 60px;
    }

}

/* Mobile-specific styles */
@media (max-width: 768px) {
  
    body {
      /* Remove flex centering on mobile to allow content to start at top */
      display: block;
      min-height: auto;
      padding-top: 0;
      margin-top: 0;
    }
    
    .logo {
      width: 280px;
      height: auto;
      margin: 20px auto 10px auto;
    }
    
    /* When timer is showing, shift the logo */
    .logo.timer-active {
        margin-left: 70px;  /* Shift right when timer appears */
        transition: margin-left 1s ease-out;  /* Ensure transition works on mobile */
    }
    
    .game-container {
        margin: 0 auto;
        padding: 0;
      }
      
    .live-timer-balloon {
        left: 80px;
        top: 42%;
        font-size: 15px;
        font-weight: 700;
        padding: 15px;
        z-index: 10;
    }

    .touch-instructions {
        display: block;
        padding: 5px 10px;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 5px;
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 5;
        white-space: nowrap;
    }
     
    .game-board {
        margin: 5px;
        overflow: hidden;
        border-radius: 8px; /* Slightly smaller radius on mobile */
      }
    
    /* Make dice smaller on mobile */
    .die {
      font-size: 14px;
      border-width: 1px;
      box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    /* Adjust selected dice appearance */
    .die.selected {
        box-shadow: 0 0 8px rgba(11, 153, 200, 0.9);
        border: 1px solid #2dc1cb !important;
    }
    
    .instructions {
        padding: 10px;
        font-size: 14px;
    }
    
    .instructions li {
        margin-bottom: 5px;
    }

    .win-time {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .timer-display {
        font-size: 16px;
    }
    
    .play-again-button {
        padding: 12px 24px;
        font-size: 16px;
    }
    
  .controls {
      margin-top: 8px;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: center;
    }
    
  /* Smaller buttons */
    button {
      padding: 10px 15px;
      font-size: 14px;
      margin: 0 2px;
    }
}