/* MTG Ibiza - Metallic Gray & Black Theme CSS */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Exo+2:wght@300;400;500;600;700&display=swap');

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%, #0a0a0a 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: #c0c0c0;
}

/* Fondo con textura metálica */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(169, 169, 169, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(128, 128, 128, 0.06) 0%, transparent 25%),
        radial-gradient(circle at 50% 100%, rgba(96, 96, 96, 0.04) 0%, transparent 50%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.02) 2px, rgba(255, 255, 255, 0.02) 4px);
    z-index: -2;
    pointer-events: none;
}

/* Partículas metálicas */
.magic-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(192, 192, 192, 0.4);
    border-radius: 50%;
    animation: float 8s infinite linear;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(100px);
        opacity: 0;
    }
}

/* Logo MTG Ibiza para header pequeño */
.mtg-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 20px rgba(192, 192, 192, 0.3),
        inset 0 0 15px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(169, 169, 169, 0.6);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 50%, #0a0a0a 100%);
}

.mtg-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(200%) translateY(200%) rotate(45deg); }
}

.logo-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    z-index: 2;
    position: relative;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

/* Logo principal para página de inicio */
.main-logo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 40px rgba(192, 192, 192, 0.4),
        inset 0 0 25px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(169, 169, 169, 0.8);
    position: relative;
    overflow: hidden;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 50%, #0a0a0a 100%);
}

.main-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

.main-logo .logo-image {
    width: 160px;
    height: 160px;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.3));
}

/* Títulos principales */
.main-title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 800;
    color: #e0e0e0;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(192, 192, 192, 0.2);
    margin-bottom: 1rem;
    letter-spacing: 4px;
}

/* Títulos con gradiente metálico */
.golden-text {
    background: linear-gradient(135deg, #f0f0f0 0%, #c0c0c0 25%, #a0a0a0 50%, #c0c0c0 75%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Orbitron', monospace;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 255, 255, 0.2);
}

/* Subtítulos */
.subtitle {
    font-size: 1.4rem;
    color: #b0b0b0;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.description {
    font-size: 1.1rem;
    color: #909090;
    max-width: 600px;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Paneles con estilo metálico */
.magic-panel {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(13, 13, 13, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(169, 169, 169, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 20px rgba(192, 192, 192, 0.1);
}

/* Botones metálicos */
.magic-button {
    background: linear-gradient(135deg, #4a4a4a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border: 1px solid rgba(169, 169, 169, 0.4);
    color: #e0e0e0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.magic-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.magic-button:hover::before {
    left: 100%;
}

.magic-button:hover {
    background: linear-gradient(135deg, #5a5a5a 0%, #3d3d3d 50%, #2a2a2a 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(192, 192, 192, 0.6);
}

.magic-button:disabled {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border-color: rgba(96, 96, 96, 0.3);
    color: #606060;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Botones principales de la página de inicio */
.main-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 3rem;
    background: linear-gradient(135deg, #4a4a4a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border: 2px solid rgba(169, 169, 169, 0.5);
    border-radius: 15px;
    color: #e0e0e0;
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 30px rgba(192, 192, 192, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    min-width: 320px;
}

.main-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.main-button:hover::before {
    left: 100%;
}

.main-button:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(192, 192, 192, 0.8);
    background: linear-gradient(135deg, #5a5a5a 0%, #3d3d3d 50%, #2a2a2a 100%);
}

.main-button:active {
    transform: translateY(-2px);
}

.button-icon {
    font-size: 1.8rem;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
}

/* Input fields con estilo metálico */
.magic-input {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(13, 13, 13, 0.9) 100%);
    border: 1px solid rgba(169, 169, 169, 0.3);
    color: #e0e0e0;
    font-family: 'Exo 2', sans-serif;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.magic-input:focus {
    border-color: rgba(192, 192, 192, 0.6);
    box-shadow: 
        0 0 0 2px rgba(169, 169, 169, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
    outline: none;
}

.magic-input::placeholder {
    color: #707070;
}

/* Cards con efectos metálicos */
.magic-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(13, 13, 13, 0.9) 100%);
    border: 1px solid rgba(169, 169, 169, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.magic-card:hover {
    border-color: rgba(192, 192, 192, 0.4);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

/* Header con branding */
.header-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.9) 100%);
    border-bottom: 2px solid rgba(169, 169, 169, 0.3);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Container principal */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

/* Header section para páginas internas */
.header-section {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 1.5s ease-out;
}

/* Action buttons para página principal */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    animation: fadeInUp 1.5s ease-out 0.5s both;
}

/* Footer */
.footer {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #707070;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Animaciones de entrada */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para MTG Keyrune */
.keyrune {
    font-size: 2rem !important;
    line-height: 1 !important;
    color: #c0c0c0 !important;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.keyrune-small {
    font-size: 1rem !important;
    color: #a0a0a0 !important;
}

/* Grid de ediciones */
.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.6) 0%, rgba(13, 13, 13, 0.8) 100%);
    border-radius: 0.75rem;
    border: 1px solid rgba(169, 169, 169, 0.2);
}

.sets-grid::-webkit-scrollbar {
    width: 6px;
}

.sets-grid::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 3px;
}

.sets-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a0a0a0 0%, #707070 100%);
    border-radius: 3px;
}

.sets-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c0c0c0 0%, #909090 100%);
}

/* Gráficos de tendencias */
.trend-chart {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(13, 13, 13, 0.9) 100%);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(169, 169, 169, 0.2);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Stats cards */
.stat-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(13, 13, 13, 0.8) 100%);
    border: 1px solid rgba(169, 169, 169, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stat-card.gain {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(26, 26, 26, 0.9) 100%);
}

.stat-card.loss {
    border-color: rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(26, 26, 26, 0.9) 100%);
}

.stat-card.info {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(26, 26, 26, 0.9) 100%);
}

.stat-card.special {
    border-color: rgba(147, 51, 234, 0.4);
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(26, 26, 26, 0.9) 100%);
}

/* Efectos de rareza para cartas */
.rarity-mythic { 
    color: #ff6b35; 
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.4); 
}

.rarity-rare { 
    color: #ffd700; 
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4); 
}

.rarity-uncommon { 
    color: #87ceeb; 
    text-shadow: 0 0 10px rgba(135, 206, 235, 0.4); 
}

.rarity-common { 
    color: #a0a0a0; 
    text-shadow: 0 0 5px rgba(160, 160, 160, 0.3);
}

/* Efectos de hover mejorados para cartas */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 
                0 10px 10px -5px rgba(0, 0, 0, 0.3),
                0 0 20px rgba(255, 255, 255, 0.1);
}

/* Efectos de brillo para logos de ediciones */
.set-logo {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.8) 0%, rgba(26, 26, 26, 0.9) 100%);
    border: 1px solid rgba(169, 169, 169, 0.3);
}

.set-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.set-logo:hover::before {
    left: 100%;
}

.set-logo:hover {
    border-color: rgba(192, 192, 192, 0.5);
    background: linear-gradient(135deg, rgba(55, 55, 55, 0.9) 0%, rgba(36, 36, 36, 0.9) 100%);
}

/* Colores de texto metálicos */
.text-golden { color: #e0e0e0; }
.text-muted { color: #a0a0a0; }
.text-light-muted { color: #808080; }
.text-very-muted { color: #606060; }

/* Botones de paginación */
.pagination-button {
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.8) 0%, rgba(26, 26, 26, 0.9) 100%);
    border: 1px solid rgba(169, 169, 169, 0.3);
    color: #c0c0c0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pagination-button:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(55, 55, 55, 0.9) 0%, rgba(36, 36, 36, 0.9) 100%);
    border-color: rgba(192, 192, 192, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.pagination-button.active {
    background: linear-gradient(135deg, #4a4a4a 0%, #2d2d2d 100%);
    color: #f0f0f0;
    border-color: rgba(192, 192, 192, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Scroll personalizado global */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a0a0a0 0%, #707070 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c0c0c0 0%, #909090 100%);
}

/* Responsive design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .main-logo {
        width: 150px;
        height: 150px;
    }
    
    .main-logo .logo-image {
        width: 120px;
        height: 120px;
    }
    
    .main-button {
        min-width: 280px;
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
        letter-spacing: 2px;
    }
    
    .action-buttons {
        gap: 1.5rem;
    }
    
    .mtg-logo {
        width: 70px;
        height: 70px;
    }
    
    .logo-image {
        width: 60px;
        height: 60px;
    }
    
    .sets-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.4rem;
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 1rem;
    }
    
    .main-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .main-button {
        min-width: 250px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .description {
        font-size: 1rem;
    }
}