/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Dev Server Indicator */
#dev-server-indicator {
    background-color: #ff5722;
    color: white;
    padding: 5px 10px;
    text-align: center;
    font-weight: bold;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}



@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.game-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease-out;
}

header {
    text-align: center;
    margin-bottom: 20px;
    animation: slideInDown 0.7s ease-out;
}

.header-image {
    margin-bottom: 15px;
    max-width: 100%;
    text-align: center; /* Center the image */
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.header-image img {
    max-width: 100%;
    width: auto; /* Allow natural width up to max-width */
    height: auto;
    max-height: 150px;
    object-fit: contain; /* Ensure the image keeps its aspect ratio */
    margin: 0 auto; /* Center the image if it's smaller than container */
}

h1 {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.puzzle-date {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: #2a6c96;
}

.subtitle {
    font-size: 16px;
    color: #666;
}

/* Game Status */
.game-status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Message Area */
.message-area {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    text-align: center;
    transform-origin: center;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: slideInDown 0.3s ease-out forwards;
}

.message-error {
    background-color: #ffeeee;
    color: #cc0000;
    border-left: 4px solid #cc0000;
    animation: shake 0.5s ease-in-out, slideInDown 0.3s ease-out forwards;
}

.message-success {
    background-color: #eeffee;
    color: #008800;
    border-left: 4px solid #008800;
    animation: pulse 0.5s ease-in-out, slideInDown 0.3s ease-out forwards;
}

.hidden {
    display: none !important;
}

/* Game Board */
.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
}

.word-tile {
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 10px 5px;
    text-align: center;
    font-size: 16px; /* Default font size */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 85px; /* Increased height to allow for 3 lines of text */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    animation: slideInUp 0.4s ease-out forwards;
    /* Add staggered animation delay based on tile position */
    animation-delay: calc(var(--tile-index, 0) * 0.05s);
    /* Prevent text from overflowing */
    position: relative;
    /* Enable hyphenation by default */
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Add an inner span to support text scaling */
.word-tile span {
    display: block;
    width: 100%;
    text-align: center;
    /* Allow text to wrap if it's too long */
    word-wrap: break-word;
    /* Ensure all text is visible */
    overflow: hidden;
    /* Keep vertical alignment */
    line-height: 1.2;
    /* Start with a reasonable height limit */
    max-height: 100%;
    /* Add a transition for font size changes */
    transition: font-size 0.2s ease-out;
}

/* Special style for tiles with long words (>8 chars) */
.word-tile.long-text span {
    font-size: 14px; /* Reduced text size for long words */
    line-height: 1.1;
    /* Force hyphenation for long words */
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Special style for tiles with very long words (>10 chars) */
.word-tile.very-long-text span {
    font-size: 12px; /* Further reduced text size for very long words */
    line-height: 1;
    /* Force hyphenation for very long words */
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    /* Add letter spacing to compress text slightly */
    letter-spacing: -0.5px;
}

.word-tile:hover {
    background-color: #e8e8e8;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.word-tile.selected {
    background-color: #d8e4f8;
    border-color: #4a78c5;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(74, 120, 197, 0.3);
}

/* Error animation for incorrect submissions */
.board-shake {
    animation: shake 0.5s ease-in-out;
}

/* Selected Words Area */
.selected-words {
    min-height: 30px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 12px;
    background-color: #4a78c5;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    background-color: #3a68b5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.submit-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.submit-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button ripple effect */
.submit-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.submit-button:not(:disabled):active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Solved Categories */
.solved-categories {
    margin-bottom: 20px;
    margin-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee; /* Add a subtle separator */
}

.solved-list {
    margin-top: 0;
    margin-bottom: 0;
}

.solved-category {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    transform-origin: center;
    animation: popIn 0.5s ease-out forwards;
    transition: all 0.3s ease;
}

/* Animation when a category is first solved */
@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Additional animation for when the solved-animation class is added */
.solved-animation {
    animation: pulse 0.8s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

.category-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.category-words {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.category-word {
    padding: 5px 10px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.3);
}

/* Category Colors */
.category-yellow {
    background-color: #F9DF6D;
    color: #333;
}

.category-green {
    background-color: #A0C35A;
    color: #333;
}

.category-blue {
    background-color: #6AACEE;
    color: #333;
}

.category-purple {
    background-color: #BA81C5;
    color: #333;
}

/* Control Buttons */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.control-button {
    flex: 1;
    padding: 10px;
    background-color: #eee;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.control-button:hover {
    background-color: #e0e0e0;
}

/* Cache reset styling removed - now using direct triple-click on version number */

/* Instructions */
.instructions {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.instructions h3 {
    margin-bottom: 10px;
}

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

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

.instructions li span {
    padding: 2px 5px;
    border-radius: 3px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
    padding-bottom: 20px;
}

/* Support link styling */
.support-link {
    margin-top: 15px;
}

.support-link a {
    color: #2196F3;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.support-link a:hover {
    background-color: #f0f0f0;
    text-decoration: underline;
    color: #0b7dda;
}

#versionDisplay {
    font-size: 12px;
    color: #aaa;
    margin-left: 5px;
    background-color: #f5f5f5;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: help;
    user-select: none;
    transition: all 0.2s ease;
    display: inline-block;
}

#versionDisplay:hover {
    background-color: #e8e8e8;
}

#versionDisplay:active {
    transform: scale(0.95);
    background-color: #e0e0e0;
}

/* Modal - COMPLETELY REVISED FOR MOBILE COMPATIBILITY */
.modal {
    display: none;
    position: fixed;
    z-index: 9999; /* Much higher z-index for maximum priority */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7); /* Darker background for better contrast */
    opacity: 0;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
}

.modal.show {
    opacity: 1 !important;
    display: flex !important; /* Force the display when showing */
    visibility: visible !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* Less margin on top for better visibility */
    padding: 25px;
    border: none;
    width: 90%; /* Wider on mobile */
    max-width: 500px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 10000; /* Ensure content is above modal background */
    position: relative;
}

/* Special overrides for mobile */
@media (max-width: 768px) {
    .modal {
        /* Mobile-specific properties */
        align-items: center !important;
        justify-content: center !important;
        background-color: rgba(0, 0, 0, 0.8); /* Darker on mobile for better contrast */
    }
    
    .modal-content {
        width: 95% !important;
        max-width: 350px !important;
        margin: 5% auto !important;
        padding: 20px !important;
        transform: none !important; /* No transform on mobile */
        opacity: 1 !important; /* Always visible on mobile */
        transition: none !important; /* No transitions on mobile */
    }
    
    /* Override animation properties on mobile for reliability */
    .modal.show .modal-content {
        transform: none !important;
        opacity: 1 !important;
    }
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 0.8;
}

.close-button:hover {
    color: black;
}

#winSummary {
    margin: 25px 0;
    line-height: 1.5;
    font-size: 18px;
    animation: fadeIn 0.6s ease-out;
}

/* Streak styles */
.streak-info {
    margin-top: 15px;
    font-weight: bold;
    color: #ff7b00;
    animation: pulse 1s ease-in-out infinite;
    line-height: 1.4;
}

.streak-count {
    font-size: 24px;
    font-weight: 800;
    margin: 0 3px;
}

/* Style for streak info in modal title */
h2 .streak-info {
    font-size: 16px;
    margin-top: 10px;
    display: inline-block;
}

.win-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.win-actions button {
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #4a78c5;
    color: white;
    animation: slideInUp 0.5s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.win-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.win-actions button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Share overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 20000; /* Much higher z-index to appear above all modals */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.overlay.active {
    opacity: 1;
}

.overlay-content {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease-out;
    z-index: 20001; /* Higher z-index than overlay to ensure it's on top */
}

.overlay.active .overlay-content {
    transform: translateY(0);
    opacity: 1;
}

/* Date selector input field */
.input-field {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

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

.close-overlay {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s, transform 0.2s;
}

.close-overlay:hover {
    color: #333;
    transform: rotate(90deg);
}

.share-text {
    margin: 25px 0;
    padding: 18px;
    background-color: #f8f8f8;
    border-radius: 8px;
    font-family: monospace;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    animation: fadeIn 0.6s ease-out 0.2s forwards;
    opacity: 0;
    border-left: 3px solid #4a78c5;
}

.share-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.share-option-button {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0;
    animation: slideInUp 0.4s ease-out forwards;
}

.share-option-button:nth-child(1) {
    animation-delay: 0.3s;
}

.share-option-button:nth-child(2) {
    animation-delay: 0.4s;
}

.share-option-button:nth-child(3) {
    animation-delay: 0.5s;
}

.share-option-button:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.share-option-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.share-icon {
    margin-right: 8px;
    font-size: 18px;
}

.share-button {
    background-color: #1da1f2;
    color: white;
}

.share-button:hover {
    background-color: #0d8fd9;
}

/* Score List */
#scoresList {
    margin-top: 15px;
    text-align: left;
}

.score-entry {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.score-entry:last-child {
    border-bottom: none;
}

/* Class for auto-scaling text */
.text-scale-fit {
    transform: scale(0.8);
}

/* Share button that appears after game completion */
.share-game-button {
    width: 100%;
    padding: 12px;
    background-color: #4a78c5;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

.share-game-button:hover {
    background-color: #3a68b5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.share-game-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Answer Reveal Styles (Game Lost) */
.answer-reveal-container {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-out;
}



.answer-reveal-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
    color: #333;
}

.answer-category {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    animation: slideInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.answer-category:nth-child(2) {
    animation-delay: 0.1s;
}

.answer-category:nth-child(3) {
    animation-delay: 0.2s;
}

.answer-category:nth-child(4) {
    animation-delay: 0.3s;
}

.answer-category:nth-child(5) {
    animation-delay: 0.4s;
}

.answer-category-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.answer-category-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.answer-word {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-size: 14px;
}

/* Message with warning style */
.message-warning {
    background-color: #fff3e0;
    color: #e65100;
    border-left: 4px solid #e65100;
}

/* Media Queries for Responsiveness */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .game-container {
        padding: 15px;
    }
    
    .game-board {
        gap: 8px;
    }
    
    /* Make sure the support link looks good on mobile */
    .support-link {
        margin-top: 12px;
        font-size: 13px;
    }
    
    .support-link a {
        padding: 8px 12px;
        display: inline-block;
    }
    
    .word-tile {
        padding: 8px 3px;
        height: 72px; /* Increased height for 3 lines of text on mobile */
        /* Keep default font size for consistent readability */
        font-size: 13px;
    }
    
    /* Ensure word-tile spans properly wrap on mobile */
    .word-tile span {
        white-space: normal;
        line-height: 1.1;
        /* Add hyphenation for mobile */
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        /* Reduce letter spacing slightly to fit more text */
        letter-spacing: -0.3px;
    }
    
    /* Stronger reductions for long and very long text on mobile */
    .word-tile.long-text span {
        font-size: 13px;
        letter-spacing: -0.5px;
    }
    
    .word-tile.very-long-text span {
        font-size: 11px;
        letter-spacing: -0.7px;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Mobile specific styling for answer reveal */
    .answer-reveal-container {
        padding: 10px;
        margin-top: 15px;
    }
    
    .answer-category {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .answer-category-title {
        font-size: 14px;
    }
    
    .answer-word {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    /* Mobile-specific modal fixes */
    .modal-content {
        margin: 0 auto; /* Center vertically and horizontally */
        width: 94%; /* Take up more width on mobile */
        padding: 20px 15px;
    }
    
    /* Make the timer text more visible on mobile */
    .timer-display {
        font-size: 2rem;
    }
    
    /* Make the completed actions fit better on small screens */
    .completed-actions {
        flex-wrap: wrap;
    }
    
    #viewResultsButton, #shareCompletedButton {
        padding: 10px 15px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 130px;
    }
}

@media (max-width: 400px) {
    .word-tile {
        padding: 6px 3px;
        height: 65px; /* Allow for 3 lines of text on smallest screens */
        /* Keep readable font size */
        font-size: 12px;
    }
    
    /* Ensure all text is visible on smallest screens */
    .word-tile span {
        line-height: 1;
        max-height: 100%;
        /* More aggressive hyphenation and spacing for smallest screens */
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        letter-spacing: -0.5px;
    }
    
    /* Even smaller font size for long and very long words on smallest screens */
    .word-tile.long-text span {
        font-size: 11px;
        letter-spacing: -0.7px;
    }
    
    .word-tile.very-long-text span {
        font-size: 10px;
        letter-spacing: -0.8px;
    }
    
    /* More aggressive modal adjustments for smallest screens */
    .modal-content {
        width: 96%;
        margin: 0 auto;
        padding: 15px 10px;
    }
    
    /* Make modal heading smaller on tiny screens */
    .modal-content h2 {
        font-size: 1.4rem;
    }
    
    /* Stack buttons vertically on tiny screens */
    .completed-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    #viewResultsButton, #shareCompletedButton {
        width: 100%;
        max-width: 180px;
        margin: 0 auto;
    }
    
    /* Smaller timer text */
    .timer-display {
        font-size: 1.8rem;
    }
}

/* Countdown Timer */
.countdown-timer {
    margin: 20px 0;
    padding: 15px;
    background-color: #111;
    border-radius: 10px;
    text-align: center;
    color: #eeeeee;
}

.timer-display {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: monospace;
    margin: 15px 0;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

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

#viewResultsButton, #shareCompletedButton {
    padding: 12px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

#viewResultsButton {
    background-color: #334;
    color: white;
}

#viewResultsButton:hover {
    background-color: #445;
}

#shareCompletedButton {
    background-color: #3a5;
    color: white;
}

#shareCompletedButton:hover {
    background-color: #4b6;
}

/* Manual Refresh Button Styles */
.refresh-button {
    display: block;
    margin: 15px auto;
    padding: 12px 20px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    animation: pulseButton 1.5s infinite alternate;
}

.refresh-button:hover {
    background-color: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.refresh-button:active {
    background-color: #0a6fc7;
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Special styling for the reload puzzle button */
#reloadPuzzleButton {
    background-color: #4CAF50;
    margin-top: 20px;
    font-size: 18px;
}

#reloadPuzzleButton:hover {
    background-color: #3e8e41;
}

@keyframes pulseButton {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    }
}
