:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-color: #c9d1d9;
    --accent-color: #58a6ff;
    --border-color: #30363d;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

h1 { margin: 0 0 10px; font-size: 2.5rem; background: linear-gradient(90deg, #58a6ff, #a371f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
p { margin: 0 0 20px; color: #8b949e; }

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

#searchInput {
    width: 100%;
    padding: 12px 20px 12px 45px;
    font-size: 16px;
    background-color: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-color);
    outline: none;
    transition: all 0.2s ease;
}

#searchInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.3);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    fill: #8b949e;
}

/* Main Container for Marquees */
#marquee-view {
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.category-section {
    width: 100%;
}

.row-label {
    padding: 0 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    max-width: 1200px;
    margin: 0 auto 15px;
    display: block;
}

.marquee-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-flex;
    gap: 20px;
    will-change: transform;
}

/* Alternating animations */
.marquee-left { animation: scrollLeft 60s linear infinite; }
.marquee-right { animation: scrollRight 60s linear infinite; }

.marquee-content:hover { animation-play-state: paused; }

@keyframes scrollLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes scrollRight {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.badge-item {
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    display: flex;
    align-items: center;
}

.badge-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

.badge-item img {
    height: 28px;
    display: block;
    border-radius: 4px;
}

/* Search Results Grid View */
#search-view {
    display: none;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.search-result-item span {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #8b949e;
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #238636;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 999;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;} 
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;} 
    to {bottom: 0; opacity: 0;}
}
