/* Reset và font chung */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.logo-icon i {
    font-size: 28px;
    color: white;
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.logo-text p {
    color: #64748b;
    font-size: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #3b82f6;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3);
}

.home-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

/* Main content */
.main-content {
    margin-bottom: 40px;
}

.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3b82f6;
}

.info-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 15px;
}

.info-card h2 i {
    color: #3b82f6;
}

.info-card p {
    color: #64748b;
    margin-bottom: 10px;
    font-size: 15px;
}

/* App container */
.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.config-section, .preview-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.config-section h2, .preview-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: #1e293b;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.config-section h2 i, .preview-header h2 i {
    color: #3b82f6;
}

.config-group {
    margin-bottom: 30px;
}

.config-group h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #334155;
    margin-bottom: 15px;
}

.config-group h3 i {
    color: #8b5cf6;
    width: 20px;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Radio và Checkbox styles */
.radio-group, .checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #475569;
    font-size: 15px;
    user-select: none;
}

.radio-label input, .checkbox-label input {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.radio-label input:checked + .radio-custom {
    border-color: #3b82f6;
}

.radio-label input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #3b82f6;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input:checked + .checkbox-custom {
    border-color: #3b82f6;
    background-color: #3b82f6;
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* Input fields */
.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    color: #334155;
    transition: all 0.3s;
    margin-top: 10px;
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-field:disabled {
    background-color: #f1f5f9;
    cursor: not-allowed;
}

.input-with-btn {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

/* Buttons */
.btn-secondary, .btn-primary, .btn-action {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #475569;
    white-space: nowrap;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

.btn-primary {
    background-color: #10b981;
    color: white;
}

.btn-primary:hover {
    background-color: #059669;
}

.btn-action {
    background-color: #f1f5f9;
    color: #475569;
}

.btn-action:hover {
    background-color: #e2e8f0;
}

/* Paths list */
.custom-disallow h4, .config-group h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #475569;
    margin-bottom: 15px;
}

.config-group h4 i {
    color: #10b981;
}

.paths-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.path-item {
    background-color: #f1f5f9;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.path-item button {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    display: flex;
    align-items: center;
}

.path-item button:hover {
    color: #ef4444;
}

/* Slider */
.slider-container {
    margin-top: 15px;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.slider-value {
    margin-top: 10px;
    font-size: 14px;
    color: #64748b;
    text-align: center;
}

.slider-value span {
    font-weight: 600;
    color: #3b82f6;
}

/* Preview section */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

.preview-container {
    background-color: #1e293b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    overflow-x: auto;
    min-height: 350px;
}

#robots-preview {
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.validation {
    background-color: #f0f9ff;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #0ea5e9;
}

.validation h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #0369a1;
    margin-bottom: 10px;
}

.validation p {
    color: #0c4a6e;
    font-size: 14px;
}

.validation a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
}

.validation a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: #cbd5e1;
    border-radius: 12px 12px 0 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info p {
    margin-bottom: 5px;
    font-size: 14px;
}

.footer-info p:first-child {
    font-size: 15px;
    color: #f1f5f9;
}

.footer-info p i {
    color: #3b82f6;
    margin-right: 8px;
}

.footer-link .home-btn {
    background-color: #475569;
}

.footer-link .home-btn:hover {
    background-color: #64748b;
}

.footer-copyright {
    text-align: center;
    padding: 15px;
    border-top: 1px solid #334155;
    font-size: 13px;
    color: #94a3b8;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 1100px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .home-btn {
        width: 100%;
        justify-content: center;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-actions {
        width: 100%;
    }
    
    .preview-actions button {
        flex: 1;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-link .home-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .config-section, .preview-section {
        padding: 20px;
    }
    
    .input-with-btn {
        flex-direction: column;
    }
    
    .logo-text h1 {
        font-size: 20px;
    }
    
    .logo-text p {
        font-size: 13px;
    }
}

/* Syntax highlighting for robots.txt preview */
.preview-container pre .comment { 
    color: #94a3b8; 
}

.preview-container pre .directive { 
    color: #60a5fa; 
    font-weight: bold; 
}

.preview-container pre .value { 
    color: #e2e8f0; 
}

/* Đảm bảo các thẻ span trong pre không làm hỏng layout */
.preview-container pre span {
    display: inline;
    background: transparent;
}