/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.header h1 i {
    color: #667eea;
}

.header p {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

/* Main content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Tool selection section */
.tool-selection h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.tool-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tool-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.tool-card.selected i {
    color: white;
}

.tool-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: #718096;
    font-size: 0.9rem;
}

.tool-card.selected p {
    color: rgba(255, 255, 255, 0.8);
}

/* Rules generator section */
.rules-generator {
    animation: fadeIn 0.5s ease;
}

.generator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.generator-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
}

/* Threats section */
.threats-section {
    margin-bottom: 2rem;
}

.threats-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.threats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.threat-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.threat-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.threat-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.threat-card h4 i {
    color: #e53e3e;
}

.threat-card p {
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.5;
}

/* Customization section */
.customization-section {
    margin-bottom: 2rem;
}

.customization-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.customization-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.option-group select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.option-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Generate section */
.generate-section {
    text-align: center;
    margin-bottom: 2rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Rules output */
.rules-output {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 1.5rem;
    animation: slideUp 0.5s ease;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.output-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.rules-content {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.rules-preview {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #2d3748;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

.rules-preview h4 {
    color: #667eea;
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
}

.rules-preview .rule-item {
    background: #f7fafc;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.rules-preview .setup-instructions {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.rules-preview .setup-instructions h5 {
    color: #c53030;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    .generator-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .customization-options {
        grid-template-columns: 1fr;
    }
    
    .output-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .output-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .tool-card i {
        font-size: 2.5rem;
    }
} 