/**
 * Wordle Solver - Dedicated Styles
 * Styling for Wordle-specific UI components
 * 
 * @package AnagramSolver
 * @version 2.0
 */

/* ============================================
   WORDLE SEARCH BOX - Mobile First
   ============================================ */
.wordle-search-box {
    max-width: 100%;
    padding: 1.5rem 1.25rem;
}

/* Hero form layout */
.hero .wordle-search-box .wordle-toggle {
    margin-bottom: 1.5rem !important;
}

.hero .wordle-search-box .wordle-section-desc {
    display: none; /* Hide descriptions in hero form for compact look */
}

.hero .wordle-search-box .wordle-section-header {
    margin-bottom: 0.5rem;
}

.hero .wordle-search-box .wordle-section-title {
    font-size: 0.95rem;
}

/* ============================================
   WORDLE TILES ROW - Stacked on Mobile
   ============================================ */
.wordle-tiles-row {
    display: block;
    margin-bottom: 1.25rem;
}

.wordle-tiles-row .wordle-section {
    margin-bottom: 1.25rem;
}

.wordle-tiles-row .wordle-section:last-child {
    margin-bottom: 0;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Small devices (576px and up) */
@media (min-width: 576px) {
    .wordle-search-box {
        max-width: 500px;
        padding: 1.75rem 1.5rem;
    }
    
    .hero .wordle-search-box .wordle-section-title {
        font-size: 1rem;
    }
}

/* Medium devices - Two Column Layout (768px and up) */
@media (min-width: 768px) {
    .wordle-search-box {
        max-width: 680px;
        padding: 2rem 1.75rem;
    }
    
    .wordle-tiles-row {
        display: flex;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .wordle-tiles-row .wordle-section {
        flex: 1;
        margin-bottom: 0 !important;
    }
    
    .hero .wordle-search-box .wordle-toggle {
        margin-bottom: 1.75rem !important;
    }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
    .wordle-search-box {
        max-width: 760px;
        padding: 2rem 1.5rem;
    }
    
    .wordle-tiles-row {
        gap: 1.25rem;
    }
    
    .hero .wordle-search-box .wordle-toggle {
        margin-bottom: 1.5rem !important;
    }
    
    .hero .wordle-search-box .wordle-section-title {
        font-size: 1rem;
    }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
    .wordle-search-box {
        max-width: 800px;
        padding: 2.25rem 2rem;
    }
    
    .wordle-tiles-row {
        gap: 2.25rem;
    }
}

/* Excluded letters section */
.wordle-section-excluded {
    margin-bottom: 1.75rem !important;
}

.wordle-section-excluded .wordle-section-header {
    margin-bottom: 0.75rem;
}

/* ============================================
   NYT TOGGLE
   ============================================ */
.wordle-toggle {
    display: flex;
    justify-content: center;
}

.toggle-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.6rem 1.25rem;
    background: #f0ebe3;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all var(--transition-fast);
    user-select: none;
    width: 100%;
}

.toggle-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #538d4e;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    background: #fff;
    transition: all var(--transition-fast);
}

.toggle-option input[type="checkbox"]:checked {
    background: #538d4e;
    border-color: #538d4e;
}

.toggle-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.toggle-icon {
    font-size: 1.1rem;
}

.toggle-label {
    font-family: var(--font-display);
    /* font-size: 0.85rem; */
    color: var(--text-dark);
}

/* ============================================
   WORDLE SECTIONS
   ============================================ */
.wordle-section {
    text-align: center;
}

.wordle-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.wordle-indicator {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.wordle-indicator.wordle-green {
    background: #6aaa64;
}

.wordle-indicator.wordle-yellow {
    background: #c9b458;
}

.wordle-indicator.wordle-gray {
    background: #787c7e;
}

.wordle-section-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.wordle-section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ============================================
   WORDLE TILES
   ============================================ */
.wordle-tiles {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.wordle-tile {
    flex: 1;
    max-width: 56px;
    aspect-ratio: 1;
    border: 2px solid #d3d6da;
    border-radius: var(--radius-md);
    background: #fff;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: var(--text-dark);
    transition: all var(--transition-fast);
    caret-color: transparent;
}

.wordle-tile:focus {
    outline: none;
}

.wordle-tile::placeholder {
    color: #d3d6da;
    opacity: 1;
}

/* Green Tiles (Correct Position) */
.wordle-tiles-green .wordle-tile {
    border-color: #538d4e;
}

.wordle-tiles-green .wordle-tile:focus {
    border-color: #538d4e;
    box-shadow: 0 0 0 3px rgba(83, 141, 78, 0.3);
    background: #f0fff4;
}

.wordle-tiles-green .wordle-tile:not(:placeholder-shown) {
    background: #538d4e;
    color: #fff;
    border-color: #538d4e;
}

/* Yellow Tiles (Misplaced) */
.wordle-tiles-yellow .wordle-tile {
    border-color: #c9b458;
}

.wordle-tiles-yellow .wordle-tile:focus {
    border-color: #c9b458;
    box-shadow: 0 0 0 3px rgba(181, 159, 59, 0.3);
    background: #fffbeb;
}

.wordle-tiles-yellow .wordle-tile:not(:placeholder-shown) {
    background: #c9b458;
    color: #fff;
    border-color: #c9b458;
}

/* ============================================
   EXCLUDED LETTERS INPUT
   ============================================ */
.wordle-excluded-input {
    width: 100%;
}

.wordle-excluded {
    width: 100%;
    border: 2px solid #787c7e;
    border-radius: var(--radius-lg);
    padding: 0.65rem 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    background: #fff;
    transition: all var(--transition-fast);
}

.wordle-excluded:focus {
    border-color: #3a3a3c;
    box-shadow: 0 0 0 3px rgba(58, 58, 60, 0.2);
    outline: none;
}

.wordle-excluded::placeholder {
    letter-spacing: normal;
    text-transform: none;
    font-size: 1rem;
}

/* ============================================
   VALIDATION TOAST NOTIFICATION
   (Uses generic .validation-toast class from main CSS)
   ============================================ */
#wordle-toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

/* Legacy support - map to generic classes */
.wordle-validation-toast,
.validation-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    background: #ffffff;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    min-width: 360px;
    max-width: 520px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #856404;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    overflow: hidden;
}

.wordle-validation-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Toast Icon */
.wordle-validation-toast .toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffc107;
    margin-top: 2px;
}

.wordle-validation-toast .toast-icon svg {
    width: 20px;
    height: 20px;
}

/* Toast Content */
.wordle-validation-toast .toast-content {
    flex: 1;
    min-width: 0;
}

.wordle-validation-toast .toast-title {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #856404;
    line-height: 1.4;
}

.wordle-validation-toast .toast-message {
    margin: 0;
    font-size: 0.85rem;
    color: #856404;
    opacity: 0.85;
    line-height: 1.5;
}

/* Close Button */
.wordle-validation-toast .toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #856404;
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
    margin-top: -2px;
    margin-right: -4px;
}

.wordle-validation-toast .toast-close:hover {
    opacity: 1;
    background-color: rgba(133, 100, 4, 0.1);
}

.wordle-validation-toast .toast-close svg {
    width: 14px;
    height: 14px;
}

/* Progress Bar */
.wordle-validation-toast .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffc107 0%, #ffb300 100%);
    width: 100%;
    transform-origin: left;
    transform: scaleX(0);
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Mobile adjustments */
@media (max-width: 576px) {
    #wordle-toast-container {
        top: 70px;
        left: 12px;
        right: 12px;
        transform: none;
    }
    
    .wordle-validation-toast {
        min-width: auto;
        width: 100%;
        padding: 0.875rem 1rem;
    }
    
    .wordle-validation-toast .toast-icon {
        width: 20px;
        height: 20px;
    }
    
    .wordle-validation-toast .toast-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .wordle-validation-toast .toast-title {
        font-size: 0.9rem;
    }
    
    .wordle-validation-toast .toast-message {
        font-size: 0.8rem;
    }
}

/* ============================================
   WORDLE SEARCH BUTTON
   ============================================ */
.btn-wordle {
    background: #E4A853 !important;
    font-size: 1.1rem;
    padding: 1rem 1.75rem;
    /* border-radius: var(--radius-lg); */
    margin-top: 0.5rem;
}

.btn-wordle:hover {
    background: #C8922E !important;
    box-shadow: 0 4px 12px rgba(228, 168, 83, 0.3);
}

/* ============================================
   WORDLE RESULTS
   ============================================ */
.wordle-results-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    min-height: 150px;
}

.wordle-results-header h3 {
    color: var(--text-dark);
}

.wordle-word-results {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.wordle-welcome,
.wordle-no-results {
    color: var(--text-muted);
}

.wordle-welcome h3,
.wordle-no-results h3 {
    color: var(--text-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ============================================
   HERO TOOL RESPONSIVE OVERRIDES
   ============================================ */

/* Extra small devices (up to 400px) */
@media (max-width: 400px) {
    .wordle-tile {
        max-width: 48px;
        font-size: 1.1rem;
    }
    
    .wordle-tiles {
        gap: 0.35rem;
    }
    
    .toggle-option {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .toggle-icon {
        font-size: 0.9rem;
    }
    
    .btn-wordle {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Small devices (up to 575px) - Mobile */
@media (max-width: 575.98px) {
    .wordle-tiles {
        gap: 0.4rem;
    }
    
    .wordle-tile {
        max-width: 52px;
        font-size: 1.2rem;
    }
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
    .wordle-tile {
        max-width: 50px;
        font-size: 1.35rem;
    }
    
    .wordle-tiles {
        gap: 0.5rem;
    }
}

/* Medium devices (768px and up) - Two Column */
@media (min-width: 768px) {
    .wordle-tile {
        max-width: 52px;
        font-size: 1.4rem;
    }
    
    .wordle-tiles {
        gap: 0.45rem;
    }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
    .wordle-tile {
        max-width: 50px;
        font-size: 1.4rem;
    }
    
    .wordle-tiles {
        gap: 0.4rem;
    }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
    .wordle-tile {
        max-width: 56px;
        font-size: 1.55rem;
    }
    
    .wordle-tiles {
        gap: 0.5rem;
    }
}

/* ============================================
   RESULTS PAGE STYLES
   ============================================ */
.section-results {
    padding: 2rem 0 4rem;
    min-height: 70vh;
    background: var(--bg-cream);
}

.results-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.results-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.results-title svg {
    flex-shrink: 0;
}

/* Search Summary - Your Clues Section */
.search-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-white);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-md);
}

.summary-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-right: 0.25rem;
}

.summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.01em;
    transition: opacity 0.15s ease;
}

.summary-badge:hover {
    opacity: 0.85;
}

/* Wordle-style colors - matching the actual game */
.summary-badge.badge-green {
    background: #6aaa64;
    color: #fff;
    border: none;
}

.summary-badge.badge-yellow {
    background: #c9b458;
    color: #fff;
    border: none;
}

.summary-badge.badge-gray {
    background: #787c7e;
    color: #fff;
    border: none;
}

.summary-badge.badge-nyt {
    background: #121213;
    color: #fff;
    border: none;
}

/* Results Container */
.results-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    min-height: 300px;
}

/* Words Grid */
.words-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* Wordle word tiles - same style as unscramble page, without points */
.wordle-solver-page .word-tile,
#wordle-results .word-tile {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: var(--tile-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wordle-solver-page .word-tile:hover,
#wordle-results .word-tile:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.wordle-solver-page .word-text,
#wordle-results .word-text {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.word-tile-hidden {
    display: none !important;
}

.words-grid.show-all .word-tile-hidden {
    display: inline-flex !important;
}

/* Show All Button */
.show-all-container {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

#wordle-results .btn-show-all,
.wordle-solver-page .btn-show-all {
    background: transparent;
    border: 2px solid #538d4e !important;
    color: #538d4e;
    /* font-size: 0.9rem; */
    font-weight: 500;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
}

#wordle-results .btn-show-all:hover,
.wordle-solver-page .btn-show-all:hover {
    background: #538d4e !important;
    border-color: #538d4e !important;
    color: #fff !important;
}

.word-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.word-points {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: #538d4e;
    padding: 0.15rem 0.45rem;
    border-radius: 50px;
    min-width: 24px;
    text-align: center;
}

/* Results Footer */
.results-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.results-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Welcome & No Results States */
.wordle-welcome,
.wordle-no-results {
    text-align: center;
    padding: 3rem 1.5rem;
}

.welcome-icon,
.no-results-icon {
    color: var(--primary);
    margin-bottom: 1rem;
}

.wordle-welcome h3,
.wordle-no-results h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.wordle-welcome p,
.wordle-no-results p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.welcome-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    max-width: 350px;
    margin: 0 auto;
}

.welcome-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.badge-green-small,
.badge-yellow-small,
.badge-gray-small {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 55px;
    text-align: center;
}

.badge-green-small {
    background: #538d4e;
    color: #fff;
}

.badge-yellow-small {
    background: #b59f3b;
    color: #fff;
}

.badge-gray-small {
    background: #787c7e;
    color: #fff;
}

.wordle-no-results ul {
    text-align: left;
    max-width: 350px;
    margin: 0 auto;
    color: var(--text-muted);
}

.wordle-no-results li {
    margin-bottom: 0.5rem;
}

/* ============================================
   SIDEBAR STYLES (Matches unscramble page)
   ============================================ */
.wordle-sidebar {
    position: static;
}

/* Wordle sidebar toggle checkbox */
.wordle-toggle-sidebar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.wordle-toggle-sidebar input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #538d4e;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    background: #fff;
    transition: all var(--transition-fast);
}

.wordle-toggle-sidebar input[type="checkbox"]:checked {
    background: #538d4e;
    border-color: #538d4e;
}

.wordle-toggle-sidebar input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.wordle-toggle-sidebar label {
    /* font-size: 0.85rem; */
    font-weight: bold;
    color: var(--text-dark);
    cursor: pointer;
    margin: 0;
}

/* Wordle Tips List */
.wordle-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wordle-tips-list li {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.wordle-tips-list li:last-child {
    border-bottom: none;
}

/* Starter words */
.starter-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.starter-word {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    background: var(--tile-bg);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.05em;
}

/* Sidebar Wordle Label */
.wordle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.indicator-green {
    background: #538d4e;
}

.indicator-yellow {
    background: #b59f3b;
}

.indicator-gray {
    background: #787c7e;
}

/* Sidebar Tiles - Smaller */
.wordle-sidebar .wordle-tiles {
    justify-content: flex-start;
}

.wordle-sidebar .wordle-tile {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
}

.wordle-sidebar .wordle-tile::placeholder {
    color: #d3d6da;
    font-size: 1.5rem;
}

/* Sidebar Excluded Input */
.wordle-sidebar .sidebar-card .wordle-excluded-input {
    width: 100%;
    max-width: none;
}

/* Override text styling for sidebar, keep only border styling */
.wordle-sidebar .wordle-excluded {
    text-transform: none;
    letter-spacing: normal;
    text-align: left;
}

/* Wordle Sidebar Button - Match other sidebar buttons */
.wordle-sidebar .btn-search {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

/* Wordle Sidebar Button Loading State */
.wordle-sidebar .btn-search.is-loading {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

.wordle-sidebar .btn-search.is-loading .spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Wordle Sidebar Excluded Input - Match filter-input styling */
.wordle-sidebar .filter-input {
    border: 2px solid #E0E0E0;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
    text-transform: none;
    letter-spacing: normal;
    text-align: left;
}

.wordle-sidebar .filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
    outline: none;
}

/* Sidebar Search Button */
.btn-wordle-search {
    background: #538d4e;
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-wordle-search:hover {
    background: #4a7c43;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(83, 141, 78, 0.3);
}

/* Tips Box */
.tips-title,
.starters-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tips-list li {
    margin-bottom: 0.5rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--primary);
}

/* Starter Words */
.starter-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.starter-word {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #f0fff4;
    border: 1px solid #a5d6a7;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================
   RESULTS PAGE RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
    .wordle-sidebar {
        position: static !important;
        margin-bottom: 2rem;
    }
    
    .wordle-sidebar .sidebar-card .wordle-tiles {
        justify-content: center;
    }
    
    .wordle-sidebar .sidebar-card .wordle-tile {
        width: 48px;
        height: 48px;
        font-size: 1.35rem;
    }
}

@media (max-width: 575.98px) {
    .section-results {
        padding: 1rem 0 2rem;
    }
    
    .results-title {
        font-size: 1.35rem;
        flex-wrap: wrap;
    }
    
    .search-summary {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    
    .summary-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.7rem;
    }
    
    .results-container {
        padding: 1rem;
    }
    
    .words-grid {
        gap: 0.4rem;
    }
    
    .word-tile {
        padding: 0.4rem 0.75rem;
    }
    
    .word-text {
        font-size: 0.9rem;
    }
    
    .wordle-sidebar .sidebar-card {
        padding: 1.25rem;
    }
    
    .wordle-sidebar .sidebar-card .wordle-tile {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
}


/* ===================================
   Floating Error Toast (No Layout Shift)
   =================================== */

.wordle-floating-error {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #fff8e6 0%, #fff3cd 100%);
    border: 1px solid #f5c518;
    border-radius: 50px;
    color: #8a6d00;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(245, 197, 24, 0.2);
    z-index: 10000;
    white-space: nowrap;
    max-width: calc(100vw - 40px);
}

.wordle-floating-error.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.wordle-floating-error .floating-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #d4a300;
}

.wordle-floating-error .floating-error-icon svg {
    width: 16px;
    height: 16px;
}

.wordle-floating-error .floating-error-text {
    line-height: 1.3;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .wordle-floating-error {
        bottom: 80px;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        border-radius: 40px;
    }
    
    .wordle-floating-error .floating-error-icon svg {
        width: 14px;
        height: 14px;
    }
}

/* ===================================
   Tile Shake Animation
   =================================== */

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

.wordle-tile.tile-shake {
    animation: tileShake 0.5s ease;
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

/* Green tiles shake */
.wordle-tiles-green .wordle-tile.tile-shake {
    background-color: #ffe0e0 !important;
}

/* Yellow tiles shake */
.wordle-tiles-yellow .wordle-tile.tile-shake {
    background-color: #fff0e0 !important;
}
