* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

p {
    text-align: center;
    margin-bottom: 30px;
    color: #7f8c8d;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 992px) {
    .form-container {
        flex-direction: row;
    }
}

@media (max-width: 991px) {
    .controls {
        flex: none;
        max-width: none;
        min-width: auto;
    }
    
    .word-list {
        max-height: 300px;
    }
    
    .tags-list {
        max-height: 120px;
    }
}

.input-section, .result-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.controls {
    flex: 0.4;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    min-width: 300px;
    max-width: 400px;
}

h2 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.realtime-label {
    font-size: 0.8rem;
    color: #27ae60;
    font-weight: normal;
}

h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1rem;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: none;
    font-family: monospace;
    font-size: 14px;
    margin-bottom: 10px;
}

button {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#censorBtn {
    margin-top: 20px;
    padding: 15px;
    font-size: 16px;
    background-color: #27ae60;
}

#censorBtn:hover {
    background-color: #219653;
}

.word-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.word-list h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

#wordsList {
    margin-bottom: 15px;
    max-height: 180px;
    overflow-y: auto;
}

.word-item {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.censor-word {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-word {
    background-color: #e74c3c;
    padding: 8px 10px;
}

.remove-word:hover {
    background-color: #c0392b;
}

#addWord {
    width: 100%;
    background-color: #95a5a6;
    margin-bottom: 10px;
}

#addWord:hover {
    background-color: #7f8c8d;
}

.import-export-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.import-export-buttons button,
.import-label {
    flex: 1;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    background-color: #34495e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.import-export-buttons button:hover,
.import-label:hover {
    background-color: #2c3e50;
}

.import-label {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden-input {
    display: none;
}

#copyBtn {
    align-self: flex-end;
    background-color: #34495e;
}

#copyBtn:hover {
    background-color: #2c3e50;
}

/* Tag styles */
.tags-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

.tags-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    min-height: 30px;
    max-height: 150px;
    overflow-y: auto;
}

.tag {
    display: flex;
    align-items: center;
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
    word-break: break-all;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    max-height: 40px;
}

.tag:hover {
    background: #bbdefb;
}

.tag.selected {
    background: #1976d2;
    color: white;
    border-color: #1565c0;
}

.tag.selected .remove-word {
    color: white;
}

.tag span {
    margin-right: 6px;
    flex: 1;
    min-width: 0;
}

.tag .remove-word {
    background: none;
    border: none;
    color: #1976d2;
    font-size: 16px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tag .remove-word:hover {
    background: rgba(25, 118, 210, 0.1);
    color: #1565c0;
}

.tag.selected .remove-word:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tag-input-container {
    margin-top: 8px;
}

#tagInput {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

#tagInput:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

/* Multi-select controls */
.multi-select-controls {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.multi-select-controls button {
    padding: 5px 8px;
    font-size: 11px;
    background-color: #6c757d;
}

.multi-select-controls button:hover {
    background-color: #5a6268;
}

.multi-select-controls button.danger {
    background-color: #dc3545;
}

.multi-select-controls button.danger:hover {
    background-color: #c82333;
}

/* Python detection section */
.python-detection {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #28a745;
}

.python-detection h4 {
    margin: 0 0 8px 0;
    color: #28a745;
    font-size: 13px;
}

.python-detection p {
    margin: 0 0 8px 0;
    font-size: 11px;
    color: #6c757d;
    text-align: left;
    line-height: 1.3;
}

.python-detection button {
    padding: 5px 10px;
    font-size: 11px;
    background-color: #28a745;
}

.python-detection button:hover {
    background-color: #218838;
} 