/* Hero */
.hero {
    text-align: center;
    padding: 6rem 2rem;
    background: 
        radial-gradient(ellipse at center, rgba(99,102,241,0.1) 0%, transparent 70%),
        var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--accent), transparent 30%);
    animation: rotate-bg 20s linear infinite;
    opacity: 0.03;
}

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

.hero-content { position: relative; z-index: 1; }

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 50%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer 3s ease-in-out infinite;
    background-size: 200% auto;
}

@keyframes text-shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.hero p { color: var(--text-secondary); font-size: 1.3rem; max-width: 500px; margin: 0 auto 2rem; }

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* Search */
.search-container { max-width: 650px; margin: 0 auto 3rem; }

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    font-size: 1.05rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow), 0 10px 40px rgba(0,0,0,0.3);
}

.search-box i {
    position: absolute;
    left: 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.search-box input:focus + i,
.search-box:focus-within i { color: var(--accent); }

/* Game Cards */
.game-card { cursor: pointer; }

.game-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    transition: transform 0.5s;
}

.game-card:hover .game-card-image { transform: scale(1.05); }

.game-card-body { padding: 1.5rem; position: relative; }

.game-card-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-card-body p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1rem; }

.game-card-footer { display: flex; justify-content: space-between; align-items: center; }

/* Game Detail */
.game-header {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--purple), var(--pink));
}

.game-header img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.game-header-info { flex: 1; }
.game-header-info h1 { font-size: 2.5rem; margin-bottom: 0.75rem; letter-spacing: -1px; }
.game-header-info p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 1.5rem; line-height: 1.7; }

.items-section { margin-top: 2rem; }
.items-section h2 { margin-bottom: 1.5rem; font-size: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.items-section h2::before { content: ''; width: 4px; height: 24px; background: linear-gradient(180deg, var(--accent), var(--purple)); border-radius: 2px; }

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.item-row:hover {
    border-color: var(--accent);
    transform: translateX(8px);
    box-shadow: -8px 0 30px rgba(99,102,241,0.1);
}

.item-info h4 { font-weight: 600; font-size: 1.1rem; margin-bottom: 0.3rem; }
.item-info span { color: var(--text-secondary); font-size: 0.9rem; }

.item-price {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--success), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.item-actions { display: flex; align-items: center; gap: 1.25rem; }

/* Admin */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.admin-header h1 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-header h1::before {
    content: '';
    width: 5px;
    height: 32px;
    background: linear-gradient(180deg, var(--accent), var(--purple));
    border-radius: 3px;
}

.admin-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: fit-content;
}

.tab {
    padding: 0.85rem 1.75rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    font-family: inherit;
}

.tab:hover { color: var(--text-primary); background: var(--glass); }

.tab.active {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.admin-table th, .admin-table td { padding: 1.25rem 1.5rem; text-align: left; }

.admin-table th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table td { border-top: 1px solid var(--border); }
.admin-table tr { transition: background 0.3s; }
.admin-table tr:hover td { background: rgba(99,102,241,0.03); }

.table-actions { display: flex; gap: 0.5rem; }

.image-preview {
    width: 100%;
    height: 160px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    overflow: hidden;
    margin-top: 0.75rem;
    transition: border-color 0.3s;
}

.image-preview:hover { border-color: var(--accent); }
.image-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-preview.empty { color: var(--text-muted); }

.preset-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.preset-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.preset-card h4 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.preset-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.25rem; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.back-link:hover { color: var(--text-primary); border-color: var(--accent); background: var(--bg-secondary); }

@media (max-width: 768px) {
    .hero { padding: 4rem 1.5rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero-stats { flex-direction: column; gap: 1.5rem; }
    .game-header { flex-direction: column; text-align: center; }
    .game-header img { margin: 0 auto; }
    .admin-header { flex-direction: column; align-items: flex-start; }
    .tabs { width: 100%; overflow-x: auto; }
}

/* Form Select */
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' 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 1rem center;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-select:hover {
    border-color: var(--accent);
}

/* User management styles */
.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.badge-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
}

/* Price search result styles */
.price-search-results {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.price-search-results h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.price-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.price-source:hover {
    transform: translateX(5px);
    background: rgba(99, 102, 241, 0.05);
}

.price-source-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.price-source-price {
    font-weight: 700;
    color: var(--success);
}

.price-source-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.875rem;
}

.price-source-link:hover {
    text-decoration: underline;
}

.price-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.price-stat {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.price-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.price-stat.recommended .price-stat-value {
    color: var(--accent);
}

@media (max-width: 768px) {
    .price-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
