* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.tab-nav {
    display: flex;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    border-right: 1px solid #eee;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn:hover {
    background: #f8f9fa;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#redirects-list {
    min-height: 200px;
}

.redirect-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.redirect-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.redirect-info {
    flex: 1;
}

.redirect-info .from {
    font-weight: 600;
    color: #dc3545;
}

.redirect-info .to {
    color: #28a745;
    margin-left: 10px;
}

.redirect-info .domain {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 5px;
}

.redirect-info .type {
    background: #17a2b8;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 10px;
}

.redirect-actions {
    display: flex;
    gap: 5px;
}

.redirect-actions .btn {
    padding: 6px 12px;
    font-size: 0.9em;
    margin-right: 0;
}

#htaccess-output {
    margin-top: 20px;
}

#htaccess-code {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    background: #f8f9fa;
    resize: vertical;
}

#sitemap-content {
    margin-top: 20px;
}

.sitemap-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sitemap-item:hover {
    background: #e9ecef;
}

.sitemap-item.selected {
    background: #d1ecf1;
    border-color: #b8daff;
}

.sitemap-url {
    flex: 1;
    font-size: 0.9em;
    word-break: break-all;
}

.sitemap-select {
    background: #28a745;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

#status-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.status-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.status-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.loop-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
}

.validation-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .tab-btn {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .tab-btn:last-child {
        border-bottom: none;
    }
    
    .redirect-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .redirect-actions {
        margin-top: 10px;
        width: 100%;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .actions .btn {
        margin-bottom: 10px;
    }
}