/* ===== PACKS PAGE - LAYOUT CORREGIDO ===== */

.page-packs-container {
    display: block;
    width: 100%;
    height: 100%;
}

.page-packs {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem;
    gap: 1.5rem;
    overflow-y: auto;
}

.packs-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 0;
    background: linear-gradient(90deg, #FFD700, #ff6b6b, #FFD700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

.packs-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.7);
    margin: 0;
    margin-bottom: 1rem;
}

/* Grid de packs - más ancho y centrado */
.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
}

.pack-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.pack-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.pack-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.pack-header h3 {
    margin: 0;
    font-size: 1.3rem;
    flex: 1;
}

.pack-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
    animation: gradientHero 2s linear infinite, glowPulse 2s ease-in-out infinite;
}

.pack-description {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex: 1;
}

.pack-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.pack-reward {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin-top: auto;
}

.reward-tag-preview {
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: bold;
    color: white;
}

/* ===== MODAL ===== */

.pack-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    backdrop-filter: blur(5px);
}

.pack-modal-content {
    background: var(--color-background, #181a20);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.modal-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: bold;
    color: white;
}

.modal-description {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.modal-progress-section {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-progress-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.modal-progress-bar {
    height: 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.modal-progress-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s ease;
}

.modal-progress-text {
    text-align: center;
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.pack-leaderboard-search {
    margin-bottom: 1rem;
}

.pack-leaderboard-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.1);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
}

.pack-leaderboard-search input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.pack-leaderboard {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.pack-leaderboard th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    font-size: 0.9rem;
}

.pack-leaderboard td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pack-leaderboard tr.highlight {
    background: rgba(255,255,255,0.1);
}

.pack-leaderboard .rank {
    color: var(--color-primary, #FCD116);
    font-weight: bold;
    width: 50px;
}

.pack-leaderboard .user {
    font-weight: 500;
}

.pack-leaderboard .progress {
    width: 200px;
}

.progress-bar-small {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-fill-small {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.pack-leaderboard .progress span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.pack-leaderboard .status {
    width: 120px;
    text-align: center;
}

.status-completed {
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    display: inline-block;
}

.status-pending {
    color: rgba(255,255,255,0.5);
    font-style: italic;
    font-size: 0.85rem;
}

.modal-close {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--color-primary, #0000005c);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.modal-close:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ===== TAGS DE PACKS ===== */

.tag-pack-inicial {
    background: linear-gradient(180deg, #4CAF50, #2E7D32);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.tag-pack-main {
    background: linear-gradient(180deg, #2196F3, #1565C0);
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

.tag-pack-extended {
    background: linear-gradient(180deg, #9C27B0, #6A1B9A);
    box-shadow: 0 0 10px rgba(156, 39, 176, 0.5);
}

.tag-pack-trilogy {
    background: linear-gradient(180deg, #BF360C, #870000);
    box-shadow: 0 0 10px rgba(191, 54, 12, 0.5);
}

.tag-pack-dioses {
    background: linear-gradient(180deg, #FFD700, #FFA000);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    color: #000 !important;
}

.tag-pack-Beginner {
    background: linear-gradient(180deg, #27e2ff, #96f1ff);
    box-shadow: 0 0 15px rgba(150, 241, 255, 0.5);
    color: #000 !important;
}

.tag-pack-ecuador {
    background: linear-gradient(180deg, #FFD700, #F57F17);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    color: #000 !important;
}

.tag-pack-perfectionista {
    background: linear-gradient(180deg, #ff00ff, #990099);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.6);
    animation: rainbow 3s linear infinite;
}

.tag-pack-femboy {
    background: linear-gradient(180deg, #f7c9f2, #c8f4ff);
    box-shadow: 0 0 10px rgba(247, 201, 242, 0.5);
}

.tag-pack-pro {
    background: linear-gradient(180deg, #FF5722, #D84315);
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
}

.tag-pack-tuti {
    background: linear-gradient(180deg, #FFD700, #FFA000);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    color: #000 !important;
}
@keyframes shine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 20px currentColor; }
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ===== ERROR MESSAGE ===== */

.error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-error);
    font-size: 1.2rem;
    text-align: center;
    padding: 2rem;
}

/* ===== SCROLLBAR OCULTA ===== */

.page-packs::-webkit-scrollbar {
    width: 0px;
    height: 0px;
}

.page-packs {
    scrollbar-width: none;
    -ms-overflow-style: none;
}