/* Dark background for the page */
body {
    background: linear-gradient(135deg, #0f311f 0%, #0f0f0f 50%, #392e07 100%);
    background-color: #0f0f0f;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.content {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    color: #ffffff;
    position: relative;
    min-height: 100vh;
}

.intro {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: 1px;
    font-family: monospace;
}

.intro p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #cccccc;
    max-width: 500px;
    margin: 0 auto;
}

.solver-form {
    margin-bottom: 40px;
}

.form-container {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(93, 250, 92, 0.5), transparent);
}

/* Wordle Grid Styles */
.wordle-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
    align-items: center;
}

.wordle-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wordle-tile {
    width: 60px;
    height: 60px;
    border: 2px solid #3a3a3c;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Source Code Pro', monospace;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.wordle-tile input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    color: inherit;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Source Code Pro', monospace;
    text-transform: uppercase;
    outline: none;
    cursor: inherit;
}

.wordle-tile:hover {
    transform: scale(1.05);
    border-color: #ffffff;
}

/* Tile States */
.wordle-tile.grey {
    background-color: #787c7e;
    border-color: #787c7e;
    color: #ffffff;
}

.wordle-tile.yellow {
    background-color: #c9b458;
    border-color: #c9b458;
    color: #ffffff;
}

.wordle-tile.green {
    background-color: #6aaa64;
    border-color: #6aaa64;
    color: #ffffff;
}

.wordle-tile.empty {
    background-color: transparent;
    border-color: #3a3a3c;
    color: #ffffff;
}

.wordle-tile.empty:hover {
    border-color: #565758;
}

/* Row Actions */
.row-actions {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

.remove-row-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #ff6b6b;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.remove-row-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.add-row-button {
    padding: 12px 20px;
    font-size: 1rem;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.add-row-button:hover {
    background: linear-gradient(135deg, #5a6578 0%, #3d4758 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.solve-button {
    padding: 15px 30px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #6aaa64 0%, #5a8f56 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    position: relative;
    overflow: hidden;
}

.solve-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(106, 170, 100, 0.3);
}

.solve-button:active {
    transform: translateY(0);
}

.solve-button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Enhanced loading state animations */
.solve-button.loading {
    background: linear-gradient(135deg, #6aaa64 0%, #5a8f56 100%);
    animation: loadingPulse 2s ease-in-out infinite;
}

.solve-button.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: loadingShimmer 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(106, 170, 100, 0.3);
    }
    50% {
        transform: translateY(-4px);
        box-shadow: 0 12px 35px rgba(106, 170, 100, 0.5);
    }
}

@keyframes loadingShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.loading-spinner {
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}

.loading-dots::before,
.loading-dots::after {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots::before {
    animation-delay: -0.32s;
}

.loading-dots::after {
    animation-delay: -0.16s;
}

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Form container loading state */
.form-container.loading {
    animation: formGlow 2s ease-in-out infinite;
}

@keyframes formGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 8px 32px rgba(106, 170, 100, 0.2);
    }
}

/* Results */
.result-container {
    margin-bottom: 40px;
}

.result-content {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(93, 250, 92, 0.5), transparent);
}

.result-success {
    border-color: #6aaa64;
    background: rgba(106, 170, 100, 0.1);
}

.result-success::before {
    background: linear-gradient(90deg, transparent, rgba(106, 170, 100, 0.8), transparent);
}

.result-error {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

.result-error::before {
    background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.8), transparent);
}

.result-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #cccccc;
    margin-bottom: 20px;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.suggestion-word {
    background: rgba(106, 170, 100, 0.2);
    border: 2px solid #6aaa64;
    border-radius: 6px;
    padding: 12px 8px;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Source Code Pro', monospace;
    letter-spacing: 1px;
    color: #ffffff;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.suggestion-word:hover {
    background: rgba(106, 170, 100, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 170, 100, 0.3);
}

/* Info Section */
.info-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
}

.info-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 500;
    text-align: center;
}

.instructions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #6aaa64;
}

.instruction-icon {
    font-size: 1.3rem;
    min-width: 25px;
    text-align: center;
    margin-top: 2px;
}

.instruction-item div {
    flex: 1;
    line-height: 1.4;
}

.instruction-item strong {
    color: #6aaa64;
}

/* Color Examples in Instructions */
.color-example {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}

.color-example.grey {
    background-color: #787c7e;
    color: #ffffff;
}

.color-example.yellow {
    background-color: #c9b458;
    color: #ffffff;
}

.color-example.green {
    background-color: #6aaa64;
    color: #ffffff;
}

/* Color Legend */
.color-legend {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.color-legend h4 {
    margin: 0 0 15px 0;
    color: #ffffff;
    text-align: center;
    font-size: 1.1rem;
}

.legend-items {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-tile {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-tile.grey {
    background-color: #787c7e;
}

.legend-tile.yellow {
    background-color: #c9b458;
}

.legend-tile.green {
    background-color: #6aaa64;
}

/* Responsive design */
@media (max-width: 768px) {
    .content {
        padding: 20px 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .wordle-tile {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .wordle-tile input {
        font-size: 1.5rem;
    }
    
    .suggestions-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .suggestion-word {
        font-size: 1rem;
        padding: 10px 6px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .legend-items {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .instruction-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .trivia-section {
        padding: 20px;
        margin-top: 20px;
    }
    
    .trivia-content p {
        margin-bottom: 15px;
    }
} 

/* Trivia Section */
.trivia-section {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(75, 0, 130, 0.08) 100%);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.trivia-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.6), transparent);
}

.trivia-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #e6d7ff;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(138, 43, 226, 0.3);
}

.trivia-content {
    line-height: 1.6;
}

.trivia-content p {
    margin-bottom: 18px;
    color: #e0e0e0;
    font-size: 1rem;
    text-align: justify;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid rgba(138, 43, 226, 0.4);
    transition: all 0.2s ease;
}

.trivia-content p:last-child {
    margin-bottom: 0;
}

.trivia-content p:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: rgba(138, 43, 226, 0.6);
    transform: translateX(2px);
}

.trivia-content strong {
    color: #c9a9dd;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(138, 43, 226, 0.2);
}