/* =============================================
   SORTEOS PAGE - Estilos de pagina de sorteos
   ============================================= */

/* Hero Section */
.sorteos-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 10, 25, 0.98) 0%, rgba(40, 30, 20, 0.95) 50%, rgba(15, 10, 25, 0.98) 100%);
    padding: 2.5rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    overflow: hidden;
}

.sorteos-hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(251, 191, 36, 0.4), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(245, 158, 11, 0.3), transparent),
        radial-gradient(2px 2px at 50px 160px, rgba(251, 191, 36, 0.3), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(245, 158, 11, 0.4), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(251, 191, 36, 0.3), transparent);
    background-size: 200px 200px;
    animation: particles 20s linear infinite;
    opacity: 0.6;
}

@keyframes particles {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}

.sorteos-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.sorteos-hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fcd34d;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.sorteos-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.sorteos-hero-accent {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #fcd34d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sorteos-hero-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.sorteos-hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.sorteos-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sorteos-hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.sorteos-hero-stat-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabs */
.sorteos-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: rgba(15, 15, 25, 0.8);
    border-radius: 14px;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sorteos-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sorteos-tab:hover {
    color: #fff;
    background: rgba(251, 191, 36, 0.1);
}

.sorteos-tab.active {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

/* Results bar */
.sorteos-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: rgba(251, 191, 36, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.1);
}

.sorteos-results-count {
    font-size: 0.9rem;
    color: #94a3b8;
}

.sorteos-results-count strong {
    color: #fbbf24;
}

/* Grid */
.sorteos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Sorteo Card - Page version */
.sorteo-card {
    background: linear-gradient(145deg, rgba(30, 25, 40, 0.98), rgba(20, 15, 30, 0.99));
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.sorteo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    opacity: 0;
    transition: opacity 0.3s;
}

.sorteo-card:hover {
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 60px rgba(251, 191, 36, 0.12);
}

.sorteo-card:hover::before {
    opacity: 1;
}

.sorteo-card-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.sorteo-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sorteo-card:hover .sorteo-card-image {
    transform: scale(1.08);
}

.sorteo-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(15, 12, 25, 0.98), transparent);
}

.sorteo-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sorteo-card-badge-ending {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    animation: pulse-ending 1.5s ease-in-out infinite;
}

.sorteo-card-badge-completed {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #fff;
}

@keyframes pulse-ending {
    0%, 100% { box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(239, 68, 68, 0.7); }
}

.sorteo-card-participants {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 15px;
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    backdrop-filter: blur(4px);
}

.sorteo-card-countdown {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.85);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
    backdrop-filter: blur(4px);
}

.sorteo-card-countdown-item {
    text-align: center;
}

.sorteo-card-countdown-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
}

.sorteo-card-countdown-label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.sorteo-card-body {
    padding: 1.5rem;
}

.sorteo-card-prize {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
    color: #fbbf24;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.sorteo-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.sorteo-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.sorteo-card-title a:hover {
    color: #fbbf24;
}

.sorteo-card-description {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sorteo-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(251, 191, 36, 0.1);
}

.sorteo-card-date {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sorteo-card-date-label {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sorteo-card-date-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sorteo-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    border-radius: 12px;
    color: #1f2937;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 18px rgba(251, 191, 36, 0.35);
}

.sorteo-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(251, 191, 36, 0.5);
}

.sorteo-card-btn-completed {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #fff;
    box-shadow: 0 4px 18px rgba(107, 114, 128, 0.3);
}

/* Skeleton loading */
.sorteo-card-skeleton {
    background: linear-gradient(145deg, rgba(30, 25, 40, 0.98), rgba(20, 15, 30, 0.99));
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 18px;
    overflow: hidden;
}

.sorteo-card-skeleton .skeleton-image {
    height: 200px;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.05) 25%, rgba(251, 191, 36, 0.1) 50%, rgba(251, 191, 36, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.sorteo-card-skeleton .skeleton-body {
    padding: 1.5rem;
}

.sorteo-card-skeleton .skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.05) 25%, rgba(251, 191, 36, 0.1) 50%, rgba(251, 191, 36, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 7px;
    margin-bottom: 0.75rem;
}

.sorteo-card-skeleton .skeleton-line.short {
    width: 40%;
}

.sorteo-card-skeleton .skeleton-line.medium {
    width: 70%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty state */
.sorteos-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(251, 191, 36, 0.03);
    border-radius: 20px;
    border: 1px dashed rgba(251, 191, 36, 0.2);
}

.sorteos-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.sorteos-empty h3 {
    font-size: 1.25rem;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.sorteos-empty p {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* Widget sorteos */
.widget-sorteos {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(20, 20, 30, 0.95));
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.my-sorteo-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.my-sorteo-item:hover {
    background: rgba(251, 191, 36, 0.1);
}

.my-sorteo-item:last-child {
    margin-bottom: 0;
}

.my-sorteo-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.my-sorteo-info {
    flex: 1;
    min-width: 0;
}

.my-sorteo-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-sorteo-status {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.my-sorteo-status.active {
    color: #4ade80;
}

.my-sorteo-status.ending {
    color: #f87171;
}

/* Responsive */
@media (max-width: 900px) {
    .sorteos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .sorteos-hero {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
        border-radius: 16px;
    }

    .sorteos-hero-title {
        font-size: 1.75rem;
    }

    .sorteos-hero-subtitle {
        font-size: 0.95rem;
    }

    .sorteos-hero-stats {
        gap: 1.5rem;
    }

    .sorteos-hero-stat-number {
        font-size: 1.5rem;
    }

    .sorteos-tabs {
        gap: 0.35rem;
        padding: 0.2rem;
    }

    .sorteos-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .sorteos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sorteo-card {
        border-radius: 14px;
    }

    .sorteo-card:active {
        transform: scale(0.98);
    }

    .sorteo-card-image-container {
        height: 180px;
    }

    .sorteo-card-body {
        padding: 1.25rem;
    }

    .sorteo-card-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .sorteo-card-date {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .sorteo-card-btn {
        width: 100%;
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }
}
