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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
}

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

header {
    text-align: center;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(10, 14, 26, 0.95));
    border: 1px solid rgba(65, 105, 225, 0.3);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.header-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

header h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #4169E1, #6495ED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    color: #a0a0a0;
}

.search-section {
    background: rgba(26, 31, 46, 0.8);
    border: 1px solid rgba(65, 105, 225, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

#searchInput {
    width: 100%;
    padding: 15px;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid rgba(65, 105, 225, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1.1em;
    margin-bottom: 15px;
}

#searchInput:focus {
    outline: none;
    border-color: #4169E1;
    box-shadow: 0 0 15px rgba(65, 105, 225, 0.3);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 8px 16px;
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid rgba(65, 105, 225, 0.3);
    border-radius: 20px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

.category-btn:hover {
    background: rgba(65, 105, 225, 0.2);
    border-color: #4169E1;
}

.category-btn.active {
    background: rgba(65, 105, 225, 0.3);
    border-color: #4169E1;
    box-shadow: 0 0 10px rgba(65, 105, 225, 0.4);
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(26, 31, 46, 0.8);
    border: 1px solid rgba(65, 105, 225, 0.3);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #4169E1;
    margin-bottom: 8px;
}

.stat-label {
    color: #a0a0a0;
    font-size: 0.9em;
}

.regex-container {
    display: grid;
    gap: 20px;
}

.regex-category {
    background: rgba(26, 31, 46, 0.8);
    border: 1px solid rgba(65, 105, 225, 0.3);
    border-radius: 12px;
    padding: 25px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.category-icon {
    font-size: 2em;
}

.category-header h3 {
    color: #4169E1;
    font-size: 1.5em;
}

.regex-grid {
    display: grid;
    gap: 15px;
}

.regex-card {
    background: rgba(10, 14, 26, 0.6);
    border: 1px solid rgba(65, 105, 225, 0.2);
    border-radius: 8px;
    padding: 18px;
    transition: all 0.3s;
}

.regex-card:hover {
    border-color: #4169E1;
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(65, 105, 225, 0.2);
}

.regex-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.regex-title {
    color: #6495ED;
    font-size: 1.1em;
    font-weight: 600;
}

.copy-btn {
    background: linear-gradient(135deg, #4169E1, #6495ED);
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(65, 105, 225, 0.4);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.regex-pattern {
    background: #0a0e1a;
    border: 1px solid rgba(65, 105, 225, 0.3);
    border-radius: 6px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #00ff00;
    word-break: break-all;
    margin-bottom: 8px;
}

.regex-description {
    color: #a0a0a0;
    font-size: 0.9em;
    line-height: 1.5;
}

.regex-example {
    margin-top: 8px;
    padding: 8px;
    background: rgba(65, 105, 225, 0.1);
    border-left: 3px solid #4169E1;
    border-radius: 4px;
}

.example-label {
    color: #6495ED;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 5px;
}

.example-text {
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

.how-to-use {
    background: rgba(26, 31, 46, 0.8);
    border: 1px solid rgba(65, 105, 225, 0.3);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
}

.how-to-use h3 {
    color: #4169E1;
    font-size: 1.8em;
    margin-bottom: 25px;
    text-align: center;
}

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

.step {
    display: flex;
    gap: 15px;
    background: rgba(10, 14, 26, 0.6);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(65, 105, 225, 0.2);
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4169E1, #6495ED);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2em;
}

.step-content h4 {
    color: #6495ED;
    margin-bottom: 8px;
}

.step-content p {
    color: #a0a0a0;
    font-size: 0.9em;
    line-height: 1.5;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
}
