/**
 * Word Cloud Styles
 */

.word-cloud-container {
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.word-entry-form {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.word-entry-form h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.25rem;
}

.word-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.word-input {
    flex: 1 1 200px;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.importance-label {
    font-weight: 500;
    color: #555;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 200px;
}

.importance-slider {
    flex: 1;
    height: 8px;
}

.importance-value {
    min-width: 2ch;
    text-align: center;
    font-weight: bold;
    color: #2563eb;
}

.add-word-btn,
.generate-cloud-btn,
.clear-words-btn,
.regenerate-cloud-btn {
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.add-word-btn:hover,
.generate-cloud-btn:hover,
.regenerate-cloud-btn:hover {
    background: #1d4ed8;
}

.clear-words-btn {
    background: #dc2626;
}

.clear-words-btn:hover {
    background: #b91c1c;
}

.words-list {
    margin: 1.5rem 0;
}

.words-list h4 {
    margin: 0 0 0.75rem 0;
    color: #555;
    font-size: 1rem;
}

.word-items {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.word-items li {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.word-text {
    flex: 1;
    font-weight: 500;
}

.word-weight {
    color: #666;
    margin: 0 0.5rem;
    font-size: 0.875rem;
}

.remove-word {
    width: 24px;
    height: 24px;
    padding: 0;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-word:hover {
    background: #dc2626;
}

.cloud-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.jqcloud-container {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    margin: 2rem 0;
    position: relative;
}

.regenerate-cloud-btn {
    display: block;
    margin: 1rem auto;
}

/* jQCloud overrides */
.jqcloud {
    font-family: inherit !important;
}

.jqcloud span {
    transition: all 0.3s ease;
}

.jqcloud span:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .word-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .slider-container {
        flex: 1 1 auto;
        width: 100%;
    }
    
    .cloud-actions {
        flex-direction: column;
    }
    
    .jqcloud-container {
        width: 100% !important;
        height: 300px !important;
    }
}