/* OVNI Anagram Finder Styles */
.ovni-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* --- Tabs --- */
.ovni-tabs {
    display: flex;
}
.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background-color: #28a745;
    color: white;
    font-size: 1em;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.tab-link.active {
    opacity: 1;
}
.tab-content {
    display: none;
    border: 1px solid #ddd;
    border-top: none;
    padding: 20px;
    background-color: #fff;
    border-radius: 0 0 5px 5px;
}
.tab-content.active {
    display: block;
}


/* --- Game Mode --- */
.draw-container {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

.draw-container.is-active {
    border-color: #0073aa;
    box-shadow: 0 0 10px rgba(0, 115, 170, 0.2);
}

.draw-header {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.draw-header .base-string {
    color: #555;
}

.draw-header .plus-sign {
    color: #d54e21;
    margin: 0 5px;
}

.letter-pool {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.letter-button {
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    min-width: 45px;
    text-align: center;
}

.letter-button:hover {
    background-color: #005a87;
}

.letter-button.used {
    background-color: #d8d8d8;
    color: #666;
    cursor: default;
    transform: scale(0.9);
}

.solution-area {
    margin-bottom: 10px;
}

input.solution-input {
    font-size: 1.5em;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    min-height: 45px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
    text-align: center;
    background-color: #fff;
    color: #333;
}

input.solution-input:focus {
    outline: none;
    border-color: #0073aa;
}

input.solution-input.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

input.solution-input.incorrect {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.found-solutions-list {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
}

.found-solutions-list li {
    color: #155724;
    font-weight: bold;
    padding: 4px 0;
}

.game-controls button {
    background-color: #28a745;
    color: white;
    border: 1px solid #1e7e34;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    margin-right: 5px;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.game-controls button:hover {
    background-color: #218838;
}

/* --- List Mode --- */
.word-length-group {
    margin-bottom: 20px;
}

.word-length-group h3 {
    color: #28a745;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.word-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.word-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 15px;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.word-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.word-card-word {
    font-weight: bold;
    font-size: 1.2em;
    color: #005a87;
    margin-bottom: 8px;
}

.word-card-def {
    font-size: 0.95em;
    color: #555;
    line-height: 1.5;
    flex-grow: 1;
}

.word-card-anagrams {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #ccc;
    font-size: 0.9em;
    color: #666;
}


/* --- Responsive --- */
@media (max-width: 600px) {
    .ovni-container {
        padding: 10px;
    }
    .letter-button {
        padding: 8px 12px;
        font-size: 1em;
        min-width: 35px;
    }
    .solution-input {
        font-size: 1.2em;
    }
    .draw-header {
        font-size: 1.2em;
    }
}