/* MTG Ibiza - Scryfall-Inspired Modern Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Serif:wght@400;600;700&display=swap');

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0f1419;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: #e0e6ed;
    line-height: 1.5;
}

/* Fondo sutil con gradiente */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top, rgba(88, 101, 242, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
}

/* Partículas sutiles */
.magic-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(30px);
        opacity: 0;
    }
}

/* Logo MTG Ibiza */
.mtg-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1f2e 0%, #16192a 100%);
    transition: all 0.3s ease;
}

.mtg-logo:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 12px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(139, 92, 246, 0.25);
}

.logo-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    z-index: 2;
    position: relative;
}

/* Logo principal para página de inicio */
.main-logo {
    width: 180px;
    height: 180px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(139, 92, 246, 0.2);
    border: 2px solid rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #1a1f2e 0%, #16192a 100%);
    transition: all 0.4s ease;
}

.main-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(45deg) translateY(-100%);
    }
    100% {
        transform: rotate(45deg) translateY(100%);
    }
}

.main-logo:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(139, 92, 246, 0.3);
}

.main-logo .logo-image {
    width: 150px;
    height: 150px;
    border-radius: 16px;
}

/* Títulos */
.main-title {
    font-family: 'Noto Serif', serif;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.description {
    font-size: 1rem;
    color: #64748b;
    max-width: 600px;
    line-height: 1.7;
}

/* Container principal */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-bottom: 250px;
    position: relative;
}

/* Header section */
.header-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
}

/* Action buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    animation: fadeInUp 0.6s ease-out 0.2s both;
    margin-bottom: 250px;
    padding-bottom: 3rem;
}

/* Botones principales - estilo Scryfall */
.main-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    color: #e0e6ed;
    text-decoration: none;
    font-family: 'Noto Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 300px;
}

.main-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.4s;
}

.main-button:hover::before {
    left: 100%;
}

.main-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 12px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.main-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 1.25rem;
}

/* Footer moderno */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    min-height: 60px;
    display: flex;
    align-items: center;
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-logo-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease;
}

.footer-logo-item:hover {
    transform: translateY(-2px);
}

.footer-logo-item img {
    height: 32px;
    width: auto;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.footer-logo-item img:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.footer-logo-item p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
}

.footer-text {
    margin: 0;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 400;
}

/* Paneles estilo Scryfall */
.magic-panel {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.magic-panel:hover {
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

/* Cards modernos */
.magic-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(139, 92, 246, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    border-radius: 12px;
}

.magic-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.7) 100%);
}

/* Stat cards */
.stat-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.stat-card.gain {
    border-color: rgba(34, 197, 94, 0.4);
}

.stat-card.loss {
    border-color: rgba(239, 68, 68, 0.4);
}

.stat-card.info {
    border-color: rgba(59, 130, 246, 0.4);
}

.stat-card.special {
    border-color: rgba(168, 85, 247, 0.4);
}

/* Botones mágicos */
.magic-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: #ffffff;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.magic-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.4s;
}

.magic-button:hover::before {
    left: 100%;
}

.magic-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

.magic-button:disabled {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-color: rgba(139, 92, 246, 0.2);
    color: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Input fields modernos */
.magic-input {
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(139, 92, 246, 0.2);
    color: #e0e6ed;
    font-family: 'Noto Sans', sans-serif;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.magic-input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
    background: rgba(15, 23, 42, 0.9);
}

.magic-input::placeholder {
    color: #64748b;
}

/* Textos con gradiente */
.golden-text {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Noto Serif', serif;
    font-weight: 700;
}

/* Colores de texto */
.text-golden { color: #a78bfa; }
.text-muted { color: #94a3b8; }
.text-light-muted { color: #cbd5e1; }
.text-very-muted { color: #64748b; }

/* Rarezas de cartas */
.rarity-mythic { 
    color: #f97316; 
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.5); 
    font-weight: 700;
}

.rarity-rare { 
    color: #fbbf24; 
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5); 
    font-weight: 600;
}

.rarity-uncommon { 
    color: #94a3b8; 
    font-weight: 500;
}

.rarity-common { 
    color: #64748b; 
}

/* 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: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.sets-grid::-webkit-scrollbar {
    width: 8px;
}

.sets-grid::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}

.sets-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 4px;
}

.sets-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

/* Efectos de hover mejorados para cartas */
.card-hover {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 
                0 0 20px rgba(139, 92, 246, 0.2);
}

/* Efectos para logos de ediciones */
.set-logo {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.set-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
    transition: left 0.4s;
}

.set-logo:hover::before {
    left: 100%;
}

/* Botones de paginación */
.pagination-button {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #e0e6ed;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.pagination-button:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

.pagination-button.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
    border-color: rgba(139, 92, 246, 0.5);
}

/* Keyrune icons */
.keyrune {
    font-size: 2rem !important;
    line-height: 1 !important;
}

.keyrune-small {
    font-size: 1rem !important;
}

/* Animaciones */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll personalizado global */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

/* Responsive design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .main-logo {
        width: 140px;
        height: 140px;
    }
    
    .main-logo .logo-image {
        width: 120px;
        height: 120px;
    }
    
    .main-button {
        min-width: 280px;
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
    }
    
    .action-buttons {
        gap: 0.875rem;
        margin-bottom: 200px;
    }
    
    .main-container {
        padding-bottom: 200px;
    }
    
    .footer {
        padding: 0.625rem;
        min-height: 55px;
    }
    
    .footer-content {
        gap: 1rem;
    }
    
    .footer-logos {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 1rem;
        padding-bottom: 180px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .main-button {
        min-width: 260px;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .subtitle {
        font-size: 1.125rem;
    }
    
    .description {
        font-size: 0.95rem;
    }
    
    .action-buttons {
        margin-bottom: 180px;
    }
    
    .footer {
        min-height: 50px;
        padding: 0.5rem;
    }
}

/* Utility classes */
.mb-8 { margin-bottom: 2rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.rounded-2xl { border-radius: 1rem; }