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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #7c3aed;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --accent: #06b6d4;
    --success: #10b981;
    --border: #475569;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #1a1f35 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

header .description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 800px;
    margin: 1.5rem auto 0;
    line-height: 1.7;
    opacity: 0.9;
}

.controls {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    font-size: 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--surface);
    color: var(--text-secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--surface-light);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.stats {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

#techniqueCount {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.2rem;
}

.techniques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.technique-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.technique-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.technique-card:hover::before {
    transform: scaleX(1);
}

.technique-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.technique-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.technique-card .category {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid var(--primary);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.technique-card .description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--surface);
    margin: 5% auto;
    padding: 2.5rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

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

.close {
    color: var(--text-secondary);
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.modal-category {
    margin-bottom: 1.5rem;
}

.modal-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.example-box, .application-box {
    background: var(--background);
    border-left: 4px solid var(--primary);
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.example-box h4, .application-box h4 {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.example-box p, .application-box p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .techniques-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}
