/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(120, 255, 198, 0.2) 0%, transparent 50%);
    pointer-events: none;
    animation: backgroundShift 20s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(2deg); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
}

.title {
    margin-bottom: 20px;
}

.holo-text {
    display: block;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holographicShine 3s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.subtitle {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #b8b8b8;
    margin-top: 10px;
    letter-spacing: 2px;
}

.tagline {
    font-size: 1rem;
    color: #888;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@keyframes holographicShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-container {
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.sort-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-group label {
    font-size: 14px;
    color: #b8b8b8;
    white-space: nowrap;
}

.sort-select {
    padding: 8px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(44, 44, 84, 0.9);
    color: white;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.3);
    background: rgba(44, 44, 84, 1);
}

.sort-select option {
    background: rgba(44, 44, 84, 1);
    color: white;
    font-family: 'Orbitron', monospace;
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: white !important;
    margin-top: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Token Grid */
.token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
    justify-items: center;
}

/* Holographic Token Cards */
.token-card {
    position: relative;
    width: 250px;
    height: 385px;
    background: 
        linear-gradient(135deg, #faf2d3 0%, #f5e6a8 50%, #ede0a3 100%);
    border-radius: 15px;
    padding: 0;
    border: 8px solid #FDE23C;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 0 3px #2c2c54,
        inset 0 0 0 6px #fff;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.token-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 25%,
        rgba(78, 205, 196, 0.2) 50%,
        rgba(255, 255, 255, 0.3) 75%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 300% 300%;
    border-radius: 7px;
    opacity: 0;
    transition: all 0.6s ease;
}

.token-card:hover::before {
    opacity: 1;
    animation: holographicSweep 3s ease-in-out infinite;
}

.token-card:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(253, 226, 60, 0.5),
        inset 0 0 0 3px #2c2c54,
        inset 0 0 0 6px #fff;
}

@keyframes holographicSweep {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* Pokemon Card Layout */
.card-header {
    background: transparent;
    padding: 20px 20px 10px 20px;
    text-align: center;
    position: relative;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
}

.token-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c2c54;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.token-symbol {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.first-edition-section {
    text-align: center;
    padding: 8px 15px;
    background: transparent;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.first-edition-text {
    font-size: 0.65rem;
    color: #d4af37;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.card-artwork {
    background: 
        radial-gradient(circle at center, rgba(40,40,60,0.9) 0%, rgba(30,30,45,0.95) 100%),
        linear-gradient(45deg, #667eea, #764ba2);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 140px;
    position: relative;
    border: 3px solid #fff;
    margin: 0 15px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-artwork::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%),
        radial-gradient(circle at 30% 30%, rgba(78, 205, 196, 0.1) 0%, transparent 50%);
    border-radius: 7px;
}

.token-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.8);
    background: linear-gradient(45deg, #667eea, #764ba2);
    object-fit: cover;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.token-card:hover .token-image {
    transform: scale(1.05);
    border-color: #ffd700;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.card-info {
    padding: 2px 20px 15px 20px;
    background: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.card-stats {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 12px;
    border: 2px solid rgba(44, 44, 84, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.85rem;
}

.stat-row:not(:last-child) {
    border-bottom: 1px solid rgba(44, 44, 84, 0.1);
}

.stat-label {
    color: #2c2c54;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #2c2c54;
    font-weight: 700;
    font-size: 0.9rem;
}

.marketcap-value {
    color: #059669;
    text-shadow: 0 1px 2px rgba(5, 150, 105, 0.2);
}

.age-value {
    color: #dc2626;
    text-shadow: 0 1px 2px rgba(220, 38, 38, 0.2);
}

/* First Edition Badge - now hidden, will show as text */
.first-edition-badge {
    display: none;
}

/* Live Data Indicator */
.live-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #ff1744, #ff5722);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
    animation: liveGlow 2s ease-in-out infinite alternate;
}

@keyframes liveGlow {
    0% { box-shadow: 0 2px 8px rgba(255, 23, 68, 0.4); }
    100% { box-shadow: 0 2px 15px rgba(255, 23, 68, 0.8), 0 0 20px rgba(255, 23, 68, 0.3); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .holo-text {
        font-size: 2.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
    }
    
    .sort-controls {
        justify-content: center;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .token-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .token-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .holo-text {
        font-size: 2rem;
    }
    
    .sort-group {
        flex-direction: column;
        gap: 5px;
    }
    
    .token-details {
        gap: 10px;
    }
}