:root {
    --bg-dark: #0a0a0a;
    --card-bg: #1a1a1a;
    --accent-purple: #a855f7;
    --accent-gold: #fbbf24;
    --rarity-common: #b1b1b1;
    --rarity-uncommon: #51b31e;
    --rarity-rare: #2ec4f6;
    --rarity-epic: #c359ff;
    --rarity-legendary: #fb9c33;
    --rarity-mythic: #f3af19;
    --rarity-marvel: #ed1d24;
    --rarity-dc: #54aaff;
    --rarity-icon: #2ec4f6;
    --rarity-starwars: #ffe81f;
    --rarity-gaming: #5340d8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: white;
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(to bottom, #111, var(--bg-dark));
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 32px;
    height: 32px;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.countdown {
    text-align: right;
}

.countdown .label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.timer {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.shop-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

/* Search Bar & Filters */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 16px;
}

#search-input {
    width: 100%;
    padding: 12px 18px 12px 45px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.filters-container {
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.filters-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0 10px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.filters-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.filter-btn.active {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* Shop Container */
#shop-container {
    padding: 20px;
    min-height: 400px;
}

.shop-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 4px solid var(--accent-purple);
    padding-left: 12px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Item Cards */
.item-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.5s ease-out forwards;
    cursor: pointer;
}

.item-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.item-card:active {
    transform: scale(0.95);
}

.item-image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252525;
}

.rarity-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.25;
}

.item-image-container img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    z-index: 1;
}

.item-info {
    padding: 12px;
}

.item-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 0.85rem;
}

.vbucks-icon {
    width: 16px;
    height: 16px;
}

.rarity-pill {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
}

/* Loader */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: rgba(255, 255, 255, 0.4);
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(168, 85, 247, 0.2);
    border-bottom-color: var(--accent-purple);
    border-radius: 50%;
    animation: rotation 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal */
.details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.details-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 450px;
    background: #151515;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 2001;
    animation: modalEntry 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalEntry {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-hero {
    width: 100%;
    aspect-ratio: 1;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-hero img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.2));
}

.modal-info {
    padding: 24px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.modal-rarity-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.modal-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 12px;
}

.stat-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 600;
}

/* iOS Prompt */
.ios-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 4000;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ios-prompt.hidden {
    transform: translateY(100%);
}

.prompt-content {
    background: #1f1f1f;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.prompt-content p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    text-align: center;
}

.prompt-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.prompt-steps span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-steps img {
    vertical-align: middle;
}

#close-prompt {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: var(--accent-purple);
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1rem;
}