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

body {
    font-family: "JetBrains Mono", monospace;
    background: #0a0f1c;
    color: #eef2ff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

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

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0a0f1c;
    padding: 16px 0 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.logo-link {
    text-decoration: none;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    font-size: 0.75rem;
    color: #9aaebf;
    display: block;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-icon {
    font-size: 1.3rem;
    color: #9aaebf;
    transition: color 0.2s;
}

.social-icon:hover {
    color: #e67e22;
}

.search-section {
    margin-bottom: 12px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(20, 27, 43, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    transition: border-color 0.2s;
}

.search-wrapper:focus-within {
    border-color: #e67e22;
}

#searchInput {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    font-family: inherit;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    border-radius: 50px 0 0 50px;
}

.search-wrapper button {
    padding: 10px 16px;
    background: rgba(230, 126, 34, 0.2);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    color: #f39c12;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 0 50px 50px 0;
    transition: background 0.2s;
}

.search-wrapper button:hover {
    background: rgba(230, 126, 34, 0.4);
}

.controls-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.controls-row select {
    flex: 1;
    max-width: 200px;
    background: rgba(20, 27, 43, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 10px 36px 10px 16px;
    font-family: inherit;
    font-size: 0.85rem;
    color: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e67e22' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 12px;
    transition: border-color 0.2s;
    min-height: 44px;
    line-height: 1.2;
}

.controls-row select:focus {
    border-color: #e67e22;
}

@media (min-width: 600px) {
    .controls-row {
        justify-content: space-between;
    }
    .controls-row select {
        max-width: none;
        flex: none;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px 0 24px;
}

@media (min-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

.product-card {
    display: block;
    background: rgba(20, 27, 43, 0.6);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(230, 126, 34, 0.6);
}

.product-card:active {
    transform: translateY(-1px);
}

.product-img {
    background: rgba(10, 15, 28, 0.4);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e67e22;
    font-size: 3rem;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.03);
}

.product-info {
    padding: 0.8rem;
    text-align: center;
}

.product-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.skeleton-card {
    background: rgba(20, 27, 43, 0.6);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: shimmer 1.5s infinite linear;
}

.skeleton-img {
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
}

.skeleton-text {
    height: 1rem;
    margin: 12px auto;
    width: 70%;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: rgba(20, 27, 43, 0.5);
    border-radius: 16px;
    color: #9aaebf;
    grid-column: 1 / -1;
}

.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 200;
    width: 48px;
    height: 48px;
    background: rgba(230, 126, 34, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.footer {
    padding: 24px 16px 28px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 15, 28, 0.8);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.footer-social a {
    color: #9aaebf;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: #e67e22;
}

.copy {
    font-size: 0.7rem;
    color: #6b7c8e;
}

@media (max-width: 599px) {
    .app-container {
        padding: 0 12px;
    }
    .header-top {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .controls-row {
        justify-content: center;
        gap: 8px;
    }
    .controls-row select {
        font-size: 0.8rem;
        padding: 9px 28px 9px 10px;
        max-width: none;
        flex: 1;
    }
    .product-img {
        height: 160px;
    }
    .product-title {
        font-size: 0.8rem;
    }
}
