/* Scrabble Solver Styles */

.solver-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.solver-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solver-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
}

.solver-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Input Section */
.letters-input {
    font-size: 1.5rem;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.letters-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.letters-input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

/* Advanced Options */
.advanced-options {
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.advanced-options .btn-link {
    color: var(--text-main);
    font-weight: 500;
}

.advanced-options .btn-link:hover {
    color: var(--accent-primary);
}

/* Stats Container */
.stats-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.stat-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #10b981;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.stat-value#bestWord {
    font-size: 1.5rem;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Results Area */
.results-area {
    margin-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.results-count {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.sort-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-btn:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.sort-btn.active {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.words-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.word-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.word-item:hover {
    border-color: #10b981;
    background: #f0fdf4;
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.word-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.word-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.word-breakdown {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: monospace;
}

.word-item-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.word-score {
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
}

.word-length {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.loading-state {
    text-align: center;
    padding: 3rem 2rem;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .solver-card {
        padding: 1.5rem;
    }
    
    .letters-input {
        font-size: 1.25rem;
        padding: 0.75rem 1rem;
    }
    
    .word-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .word-item-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

