.header {
    padding: 25px;
    text-align: center;
}

.description {
    opacity: 0.9;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.rules-section {
    flex: 1;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.text-section {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 2px solid #eaeaea;
}

.rule-item {
    display: flex;
    margin-bottom: 15px;
    gap: 10px;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.rule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rule-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.rule-input:focus {
    outline: none;
    border-color: #2575fc;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.2);
}

.remove-btn {
    background-color: #ff4757;
    color: white;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.remove-btn:hover {
    background-color: #ff3742;
}

.add-btn {
    background-color: #2ed573;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
}

.add-btn:hover {
    background-color: #26c464;
    transform: translateY(-2px);
}

.text-area-container {
    flex: 1;
    display: flex;
    margin-bottom: 20px;
}

.text-area-label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

textarea {
    width: 100%;
    height: 100%;
    min-height: 350px;
    padding: 15px 14px 0px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #2575fc;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.2);
}

.search-box {
    display: flex;
    margin-bottom: 15px;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
    border-color: #2575fc;
    box-shadow: 0 0 0 2px rgba(37, 117, 252, 0.2);
}

.search-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: bold;
}

.file-upload {
    margin: 15px 0 15px 0;
    padding: 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: #2575fc;
}

.file-upload input {
    display: none;
}

.file-upload label {
    display: block;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-upload label:hover {
    background-color: #e9ecef;
}

.actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.replace-btn {
    background-color: #2196F3;
    color: white;
}

.replace-btn:hover {
    background-color: #2f36d4;
    transform: translateY(-2px);
}

.reset-btn {
    background-color: #FF5722;
    color: white;
}

.reset-btn:hover {
    background-color: #FF9800;
    transform: translateY(-2px);
}

.download-btn {
    background-color: #4CAF50;
    color: white;
}

.download-btn:hover {
    background-color: #8BC34A;
    transform: translateY(-2px);
}

.stats {
    margin-top: 20px;
    padding: 10px 10px 0 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 0.95rem;
}

.highlight {
    background-color: #fff9c4;
    padding: 2px 4px;
    border-radius: 3px;
}

.search-highlight {
    background-color: #ffeb3b;
    padding: 1px 3px;
    border-radius: 3px;
}

.icon {
    font-size: 1.2rem;
}

.info {
    background: #eee;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.info-title h3 {
    border-left-style: 5px solid #000;
    border-left: 5px solid #4CAF50;
    padding: 0 0px 0px 10px;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .rules-section,
    .text-section {
        width: 100%;
        padding: 0;
        background: #fff;
        box-shadow: inherit;
    }

    .rule-item {
        display: grid;
    }

    .section-title {
        border-bottom: 0;
    }

    .actions {
        flex-direction: column;
    }
}