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

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.world-map-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 100, 200, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 150, 100, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    z-index: -1;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 5rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 0.25rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    max-width: 1000px;
    position: relative;
}

.header-streak {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.streak-flame {
    width: 2.5rem;
    height: 3rem;
    transition: all 0.3s ease;
}

.streak-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #feb139;
    transition: color 0.3s ease;
}

.streak-number.gray {
    color: #a0a0a0;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.header-logo {
    height: 4rem;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    display: block;
    margin: 0;
    padding: 0;
    line-height: 0;
    vertical-align: top;
}

.subtitle {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 400;
    margin-top: 0.25rem;
}



.game-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* HINT SECTION LEFT LAYOUT */
.sentence-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.translate-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Desktop layout for new structure */
.translate-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.language-boxes-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
    width: 100%;
}

.content-boxes-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    flex: 1;
    width: 100%;
}

.sentence, .translation {
    flex: 1;
    display: flex;
    align-items: center;
}

/* Ensure language boxes and content boxes align perfectly */
.language-boxes-container .language-box {
    flex: 1;
    width: 50%;
}

.content-boxes-container .sentence {
    flex: 1;
    width: 50%;
}

.content-boxes-container .translation {
    flex: 1;
    width: 50%;
}

.translate-left, .translate-right {
    flex: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    position: relative;
}

.translate-arrows {
    display: none;
}

.arrow-image {
    width: 24px;
    height: 24px;
}

.arrow-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.arrow-left, .arrow-right {
    font-size: 1.2rem;
    color: #a0a0a0;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.arrow-left:hover, .arrow-right:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.language-box {
    background: transparent;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.language-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #87CEEB;
    margin: 0;
    padding: 0;
    border: none;
    text-transform: none;
    letter-spacing: normal;
    text-align: left;
}
.sentence-display > div {
    width: 100%;
}
.sentence-display .hint-section {
    align-self: flex-start;
    margin-right: 1rem;
    min-width: 180px;
}
.sentence-display .sentence {
    text-align: left;
}

.hint-section {
    margin-bottom: 1rem;
}

.hint-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.hint-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.hint-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.hint-btn.active {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.9);
    color: #ffffff;
}

/* Hint button and display inline, same height */
#hintBtn {
    vertical-align: middle;
    min-height: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    box-sizing: border-box;
    margin: 0;
}
#hintDisplay.hint-display {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.4;
    box-sizing: border-box;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}
#hintDisplay.hint-display.show {
    display: flex;
}

/* Second hint display styling to match the first */
#hintDisplay2.hint-display {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.4;
    box-sizing: border-box;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

#hintDisplay2.hint-display.show {
    display: flex;
}

/* Map hint styles */
.map-hint-container {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.map-hint-container .leaflet-container {
    background: #1a1a1a;
}

.map-hint-container .leaflet-control-attribution {
    display: none;
}

.map-hint-container .leaflet-control-zoom {
    display: none;
}

.sentence-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #a0a0a0;
}

/* 6-SLOT GUESS HISTORY */
.guesses-history {
    display: flex !important;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 12rem;
    max-height: 15rem;
    justify-content: flex-start;
}
.guess-item {
    min-height: 1.8rem;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.05);
}
.guess-results {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
}
.result-value.correct {
    background: rgba(34, 197, 94, 0.3);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.5);
}
.result-value.incorrect {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
}
/* Remove attempts/date styles */
.sentence-info, .sentence-info .attempts, .sentence-info .date {
    display: none !important;
}

.guessing-section {
    margin-bottom: 1rem;
}

.guess-phase {
    margin-bottom: 1rem;
}

.guess-phase h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    text-align: center;
}

.guess-prompt {
    font-size: 1.5rem;
    font-weight: 600;
    color: #87CEEB;
    margin-bottom: 1rem;
    text-align: center;
    padding-left: 4rem; /* Space for back button */
    padding-right: 4rem; /* Space for forward button */
    box-sizing: border-box;
}

.language-result {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.language-result-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
}

.language-result-message {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 10px;
    background: transparent;
    border: none;
}

.result-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.result-text.success {
    color: #22c55e;
}

.result-text.failure {
    color: #ef4444;
}

.correct-language-info {
    margin-top: 0.5rem;
    padding: 0;
    background: transparent;
    border-radius: 8px;
    border: none;
    text-align: center;
}

.correct-language {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.translation {
    font-size: 1.6rem;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.5;
    min-height: 12rem;
    display: flex;
    align-items: flex-start;
    text-align: left;
    margin: 0;
    flex: 1;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.translation.placeholder {
    color: #a0a0a0;
    font-style: italic;
}

.country-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.guess-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
}

.guess-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guess-input label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #a0a0a0;
}

.dropdown {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dropdown:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dropdown:disabled {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
    cursor: not-allowed;
    opacity: 0.8;
}

.dropdown option {
    background: #1a1a2e;
    color: #ffffff;
}

/* Searchable dropdown styles */
.searchable-dropdown {
    position: relative;
    width: 100%;
}

.searchable-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.searchable-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.searchable-input:disabled {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Final game over states for country inputs */
.searchable-input.correct-final {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
    font-weight: 600;
}

.searchable-input.incorrect-final {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    font-weight: 600;
}

.searchable-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown-option {
    padding: 0.75rem 1rem;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option.no-results {
    color: rgba(255, 255, 255, 0.5);
    cursor: default;
}

.dropdown-option.no-results:hover {
    background: transparent;
}



/* Instructions Popup Styles */
.instructions-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.instructions-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

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

.instructions-header h2 {
    color: #60a5fa;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.instructions-body {
    margin-bottom: 2rem;
}

.instruction-step {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.instruction-step h3 {
    color: #60a5fa;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.instruction-step p {
    color: #ffffff;
    line-height: 1.6;
    margin: 0;
}

.instruction-features {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.instruction-features h3 {
    color: #60a5fa;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.instruction-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-features li {
    color: #ffffff;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.5;
}

.instruction-features li:last-child {
    border-bottom: none;
}

.instruction-tip {
    padding: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.instruction-tip p {
    color: #ffd700;
    margin: 0;
    line-height: 1.6;
    font-style: italic;
}

.start-game-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.start-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(96, 165, 250, 0.3);
}

.start-game-btn:active {
    transform: translateY(0);
}

/* Mobile responsive for instructions */
@media (max-width: 768px) {
    .map-hint-container {
        height: 250px;
    }
    
    .instructions-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .instructions-header h2 {
        font-size: 1.5rem;
    }
    
    .instruction-step h3,
    .instruction-features h3 {
        font-size: 1.1rem;
    }
}

.submit-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #D2B48C 0%, #B8860B 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(210, 180, 140, 0.3);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.guesses-history {
    margin-top: 0.75rem;
}

.guess-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.guess-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #a0a0a0;
}

.guess-results {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0.75rem;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.result-label {
    font-size: 0.75rem;
    color: #a0a0a0;
    font-weight: 500;
}

.result-value {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    text-align: center;
}

.correct {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.incorrect {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.partial {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.game-over {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-over h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.result-info {
    margin-bottom: 2rem;
}

.result-info p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.new-game-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .guess-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .country-inputs {
        grid-template-columns: 1fr;
    }
    
    .submit-btn {
        width: 100%;
    }
    
    .guess-results {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .sentence {
        font-size: 1.3rem;
    }
    
    .sentence-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .language-result-display {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Fix hint text overflow */
    #hintDisplay.hint-display {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100%;
        padding: 0.5rem;
        min-height: auto;
        height: auto;
    }
    
    /* Fix play next and share buttons layout */
    .play-next-section {
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .play-next-btn,
    .share-btn {
        width: auto;
        min-width: 140px;
        max-width: 200px;
        flex: 1;
        box-sizing: border-box;
    }
    
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .game-container {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Fix hint row layout */
    .hint-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    #hintBtn, #hintBtn2 {
        width: auto;
        justify-content: flex-start;
    }
    
    #hintDisplay.hint-display {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .guess-results {
        grid-template-columns: 1fr;
    }
    
    .game-container {
        padding: 0.75rem;
        margin: 0;
    }
    
    .sentence-display {
        padding: 0.75rem;
    }
    
    .translate-container {
        flex-direction: column;
        max-width: 100%;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .translate-left, .translate-right {
        padding: 0.75rem;
        min-height: 100px;
    }
    
    /* Mobile layout: language boxes side by side, content boxes stacked */
    .translate-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    /* Language boxes container */
    .language-boxes-container {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .translate-left, .translate-right {
        flex: 1;
        padding: 0.5rem;
        min-height: auto;
    }
    
    /* Content boxes container */
    .content-boxes-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Hide arrows on mobile */
    .translate-arrows {
        display: none;
    }
    
    /* Make content boxes full width and stacked */
    .content-boxes-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    .sentence {
        width: 100% !important;
        min-height: 8rem;
        margin: 0 !important;
        padding: 1rem;
        box-sizing: border-box;
        flex: none !important;
    }
    
    .translation {
        width: 100% !important;
        min-height: 8rem;
        margin: 0 !important;
        padding: 1rem;
        box-sizing: border-box;
        flex: none !important;
    }
    
    /* Hide arrows on mobile */
    .translate-arrows {
        display: none;
    }
    
    .translate-arrows {
        margin-top: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .arrow-image {
        width: 20px;
        height: 20px;
    }
    
    .arrow-container {
        flex-direction: row;
        gap: 1rem;
    }
    
    .sentence, .translation {
        font-size: 1.4rem;
    }
    
    .container {
        padding: 0.75rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0;
        justify-content: center;
    }
    
    .header-streak {
        font-size: 1.5rem;
        margin-left: 0;
    }
    
    .streak-flame {
        width: 1.8rem;
        height: 2.2rem;
    }
    
    .streak-number {
        font-size: 1.8rem;
    }
    
    .header-logo {
        height: 3.5rem;
        max-width: 200px;
        margin: 0;
        padding: 0;
        line-height: 0;
        vertical-align: top;
    }
    
    .sentence {
        font-size: 1.1rem;
        padding: 0 0.5rem;
    }
    
    .play-next-btn,
    .share-btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
        min-width: 120px;
        box-sizing: border-box;
    }
    
    /* Ensure no horizontal scroll on very small screens */
    * {
        max-width: 100vw;
    }
} 

.hint-row {
    display: flex !important;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    flex-direction: column;
} 

/* Make guess slots fill the whole width and center content */
#languageGuessesHistory {
    width: 100%;
    display: flex !important;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 12rem;
    max-height: 15rem;
    justify-content: flex-start;
}
#languageGuessesHistory .guess-item {
    min-height: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: none;
    border-radius: 10px;
    margin-bottom: 0;
    box-sizing: border-box;
    border: none;
}
#languageGuessesHistory .guess-results {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
}
#languageGuessesHistory .result-value {
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    background: none;
    border: none;
}
#languageGuessesHistory .result-item {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
}
#languageGuessesHistory .result-value:not(.correct):not(.incorrect) {
    background: rgba(255,255,255,0.06);
    color: #888;
}
#languageGuessesHistory .result-value.correct {
    background: rgba(34, 197, 94, 0.3);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.5);
}
#languageGuessesHistory .result-value.incorrect {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
} 

/* Country guessing slots - same as language */
#countryGuessesHistory {
    width: 100%;
    display: flex !important;
    flex-direction: column;
    gap: 0.25rem;
    height: auto;
    justify-content: flex-start;
}
#countryGuessesHistory .guess-item {
    min-height: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: none;
    border-radius: 10px;
    margin-bottom: 0;
    box-sizing: border-box;
    border: none;
}
#countryGuessesHistory .guess-results {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
}
#countryGuessesHistory .result-value {
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    background: none;
    border: none;
}
#countryGuessesHistory .result-item {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
}
#countryGuessesHistory .result-value:not(.correct):not(.incorrect) {
    background: rgba(255,255,255,0.06);
    color: #888;
}
#countryGuessesHistory .result-value.correct {
    background: rgba(34, 197, 94, 0.3);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.5);
}
#countryGuessesHistory .result-value.incorrect {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
} 

.play-next-section {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.play-next-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(96, 165, 250, 0.3);
}

.play-next-btn:active {
    transform: translateY(0);
} 

.share-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    font-family: inherit;
    white-space: nowrap;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.share-btn:active {
    transform: translateY(0);
}

.country-result-message {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 10px;
    background: transparent;
    border: none;
}

.all-countries-info {
    margin-top: 1rem;
    padding: 1rem;
    background: transparent;
    border-radius: 8px;
    border: none;
}

.all-countries-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 0.75rem;
}

.all-countries-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.1rem;
    justify-content: center;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.all-countries-list span {
    background: transparent;
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.all-countries-list span::before {
    content: "";
    display: none;
} 

.sentence {
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0;
    color: #ffffff;
    line-height: 1.5;
    min-height: 12rem;
    display: flex;
    align-items: center;
    text-align: left;
    flex: 1;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Footer Styles */
.site-footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-sep {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0.5rem;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-sep {
        display: none;
    }
} 

/* Strikes display for country guessing */
.strikes-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.strikes-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.strikes-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff6b6b;
}

.countries-found {
    font-size: 1rem;
    color: #4ecdc4;
}

.strikes-visual {
    display: flex;
    gap: 0.5rem;
}

.strike {
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.strike.active {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
}

.strike.used {
    background: rgba(128, 128, 128, 0.2);
    border: 2px solid #808080;
    color: #808080;
}

/* Mobile responsive for strikes display */
@media (max-width: 768px) {
    .strikes-display {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .strikes-info {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .strike {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .strikes-info {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .strikes-text, .countries-found {
        font-size: 0.9rem;
    }
    
    .strike {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
} 

/* New country guessing UI layout */
.country-ui-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.country-sentence {
    font-size: 1.2rem;
    color: #ffffff;
    text-align: center;
    font-weight: 500;
}

.progress-counter {
    font-size: 2rem;
    font-weight: bold;
    color: #4ecdc4;
    text-align: center;
}

.strikes-display-new {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-direction: row;
}

.strike-x {
    font-size: 2rem;
    padding: 0.5rem;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #000000;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.strike-x.black {
    background: rgba(255, 255, 255, 0.1);
    color: #000000;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.strike-x.used {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    border: 2px solid #ff6b6b;
}

.country-input-full {
    width: 100%;
}

.searchable-input.full-width {
    width: 100%;
    box-sizing: border-box;
}

/* Mobile responsive for new country UI */
@media (max-width: 768px) {
    .country-ui-layout {
        gap: 1rem;
    }
    
    .country-sentence {
        font-size: 1rem;
    }
    
    .progress-counter {
        font-size: 1.5rem;
    }
    
    .strikes-display-new {
        gap: 0.75rem;
    }
    
    .strike-x {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .country-sentence {
        font-size: 0.9rem;
    }
    
    .progress-counter {
        font-size: 1.3rem;
    }
    
    .strikes-display-new {
        gap: 0.5rem;
    }
    
    .strike-x {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
} 

/* Country guesses grid layout for compact display */
.country-guesses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
}

.country-guess-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.country-guess-item .result-value {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.country-guess-item .result-value.correct {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.country-guess-item .result-value.incorrect {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Back button styles for other pages */
.back-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

/* Game back button styles (circular) */
.back-btn.game-back-btn {
    background: transparent;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    font-size: 1.2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.back-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.back-btn:active {
    transform: translateY(0);
}

.back-btn.game-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Forward button styles */
.forward-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.forward-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
}

.forward-btn:active {
    transform: translateY(0);
}

.back-button-section {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}

.forward-button-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* Mobile responsive for back button */
@media (max-width: 768px) {
    .back-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .back-btn.game-back-btn {
        padding: 0.6rem;
        font-size: 1.1rem;
        width: 2.8rem;
        height: 2.8rem;
    }
    
    .forward-btn {
        padding: 0.6rem;
        font-size: 1.1rem;
        width: 2.8rem;
        height: 2.8rem;
    }
}

@media (max-width: 480px) {
    .back-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .back-btn.game-back-btn {
        padding: 0.5rem;
        font-size: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .forward-btn {
        padding: 0.5rem;
        font-size: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Mobile responsive for country guesses grid */
@media (max-width: 768px) {
    .country-guesses-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
        max-height: 180px;
        padding: 0.4rem;
    }
    
    .country-guess-item {
        min-height: 30px;
        padding: 0.2rem 0.4rem;
    }
    
    .country-guess-item .result-value {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        line-height: 1.1;
        min-height: 18px;
    }
}

@media (max-width: 480px) {
    .country-guesses-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
        max-height: 160px;
        padding: 0.3rem;
    }
    
    .country-guess-item {
        min-height: 28px;
        padding: 0.15rem 0.3rem;
    }
    
    .country-guess-item .result-value {
        font-size: 0.75rem;
        padding: 0.15rem 0.3rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        line-height: 1.1;
        min-height: 16px;
    }
}

/* Ensure consistent share button sizing */
#shareBtn, #shareBtnLanguage {
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

/* Country share button container styling */
.country-share-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
    width: 100%;
}

.country-share-container .play-next-btn {
    min-width: 120px;
    text-align: center;
}

/* Mobile popup styles */
@media (max-width: 768px) {
    /* Ensure popups are properly centered on mobile */
    [style*="position: fixed"][style*="top: 50%"][style*="left: 50%"] {
        width: auto !important;
        max-width: 85vw !important;
        min-width: 200px !important;
        text-align: center !important;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
}

@media (max-width: 480px) {
    /* Further adjustments for very small screens */
    [style*="position: fixed"][style*="top: 50%"][style*="left: 50%"] {
        max-width: 90vw !important;
        min-width: 180px !important;
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem !important;
    }
} 