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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
}

.subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

#search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #334155;
    border-radius: 12px;
    background: #1e293b;
    color: #f1f5f9;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

#search-input::placeholder {
    color: #64748b;
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.clear-btn:hover {
    color: #f1f5f9;
    background: #334155;
}

.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.filters input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 16px;
    height: 16px;
}

.result-count {
    color: #64748b;
    font-size: 0.85rem;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 16px;
    transition: border-color 0.2s, transform 0.1s;
}

.card:hover {
    border-color: #475569;
    transform: translateY(-1px);
}

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

.card-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f1f5f9;
    flex: 1;
}

.card-se {
    background: #3b82f6;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    margin-left: 10px;
}

.card-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    font-size: 0.82rem;
}

.detail {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-label {
    color: #64748b;
    font-weight: 500;
    min-width: 32px;
}

.detail-value {
    color: #cbd5e1;
}

.detail-value.highlight {
    color: #fbbf24;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 48px 20px;
    color: #64748b;
}

.no-results .icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.no-results p {
    font-size: 1rem;
}

.no-results .hint {
    font-size: 0.85rem;
    margin-top: 8px;
    color: #475569;
}

.loading {
    text-align: center;
    padding: 32px;
    color: #64748b;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.initial-message {
    text-align: center;
    padding: 60px 20px;
    color: #475569;
}

.initial-message .icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.initial-message p {
    font-size: 1.1rem;
    color: #64748b;
}

.initial-message .hint {
    font-size: 0.85rem;
    margin-top: 10px;
    color: #475569;
}

mark {
    background: rgba(250, 204, 21, 0.25);
    color: #fbbf24;
    border-radius: 2px;
    padding: 0 2px;
}

@media (max-width: 640px) {
    .container {
        padding: 12px;
    }
    header h1 {
        font-size: 1.4rem;
    }
    #search-input {
        font-size: 1rem;
        padding: 14px 46px 14px 16px;
    }
    .card {
        padding: 12px;
    }
    .card-name {
        font-size: 0.95rem;
    }
    .card-details {
        grid-template-columns: 1fr 1fr;
    }
    .filters {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}
