:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --primary: #3b82f6;
    --text: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #334155;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

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

header {
    padding: 60px 0 40px;
    text-align: center;
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background-color: rgba(15, 23, 42, 0.8);
}

h1 {
    font-size: 3rem;
    margin: 0 0 10px;
    background: linear-gradient(to right, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

input {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

#count {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    padding: 40px 0;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.card img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    margin-bottom: 10px;
}

.card .actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px;
    display: flex;
    justify-content: center;
    gap: 10px;
    transform: translateY(100%);
    transition: transform 0.2s;
}

.card:hover .actions {
    transform: translateY(0);
}

.btn-icon {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 100;
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

#loading-trigger {
    height: 50px;
    margin: 20px 0;
}
