h1 {
    text-align: center;
    color: #2c3e50;
}
.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.container {
    display: grid;
    grid-template-columns: 1.2fr 1.3fr;
    gap: 15px;
}

@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
}

.panel {
    background-color: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.panel:hover {
    transform: translateY(-5px);
}

.panel h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

.input-section {
    display: flex;
    flex-direction: column;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}

button {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0);
}

#clear-btn {
    background: linear-gradient(to right, #e74c3c, #c0392b);
}

select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f8f9fa;
    font-size: 14px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.options-group {
    margin-top: 10px;
}

.options-group h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.style-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.style-option {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: white;
}

.style-option:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.style-option.active {
    border-color: var(--primary-color);
    background-color: #eaf7ff;
    transform: scale(1.05);
}

.color-preview {
    width: 100%;
    height: 25px;
    border-radius: 5px;
    margin-bottom: 8px;
}

#wordcloud-container {
    width: 100%;
    height: 78%;
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

#wordcloud {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(52, 152, 219, 0.2);
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* .footer {
    margin-top: 30px;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
} */

.tip {
    background-color: #e1f5fe;
    border-left: 4px solid #039be5;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
    font-size: 0.95rem;
} 