/**
 * Pokedex Page Styles for ezmons.com
 * Extends the glassmorphism theme
 */

/* Pokemon Grid Enhancements */
.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (min-width: 1200px) {
    .pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
}

/* Pokemon Card */
.pokemon-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.pokemon-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(102, 126, 234, 0.1),
        transparent,
        rgba(118, 75, 162, 0.1),
        transparent
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    animation: rotate 4s linear infinite paused;
}

.pokemon-card:hover::before {
    opacity: 1;
    animation-play-state: running;
}

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

.pokemon-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--glass-shadow-hover), var(--accent-glow);
    border-color: var(--accent-primary);
}

.pokemon-card img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform var(--transition-normal);
}

.pokemon-card:hover img {
    transform: scale(1.15);
}

.pokemon-card.shiny img {
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.5));
}

/* Pokemon Info */
.pokemon-dex {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.pokemon-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.pokemon-types {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* Caught indicator */
.pokemon-card.caught::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    z-index: 2;
}

/* Order Modal Enhancements */
.modal-step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-step[style*="display: none"] {
    display: none !important;
}

/* Level Controls */
.level-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.level-controls input {
    text-align: center;
    font-weight: 600;
}

/* Shiny Toggle */
.shiny-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.shiny-toggle input[type="checkbox"] {
    width: 24px;
    height: 24px;
}

/* Ball/Item Display */
.item-preview {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--glass-bg-light);
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
}

.item-preview img {
    width: 32px;
    height: 32px;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-2xl);
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

/* Infinite scroll loader */
#scrollLoader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

/* Type badge adjustments for cards */
.pokemon-card .type-badge {
    font-size: 10px;
    padding: 2px 6px;
}

/* Stats preview in modal */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Abilities */
.ability-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.ability-badge {
    background: var(--glass-bg-light);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-secondary);
}

.ability-badge.hidden-ability {
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

/* Autocomplete dropdown for items */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
}

.autocomplete-item {
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: background var(--transition-fast);
}

.autocomplete-item:hover {
    background: var(--glass-bg-light);
}

.autocomplete-item img {
    width: 24px;
    height: 24px;
}
