/* ================================================
   FERNANDA MARTINELLI - ENTREGAVEL
   Rede Social Premium - Dark Red + Black
   Mobile First
   ================================================ */

:root {
    --bg-primary: #080808;
    --bg-secondary: #0d0d0d;
    --bg-surface: #121212;
    --bg-surface-2: #1a1a1a;
    --bg-surface-3: #222222;
    --bg-glass: rgba(12, 12, 12, 0.92);

    --red-blood: #8b0000;
    --red-dark: #6b0000;
    --red-crimson: #dc143c;
    --red-accent: #ff1744;
    --red-soft: #ff4569;
    --red-glow: rgba(139, 0, 0, 0.35);

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #606060;

    --gradient-main: linear-gradient(135deg, #8b0000, #1a0000);
    --gradient-cta: linear-gradient(135deg, #dc143c, #8b0000);

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(139,0,0,0.2);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --header-height: 56px;
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    user-select: none;
}

img, video {
    display: block;
    max-width: 100%;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--red-blood); border-radius: var(--radius-full); }


/* ================================================
   APP SHELL
   ================================================ */
.app {
    min-height: 100vh;
    max-width: 100%;
    padding-bottom: 40px;
}


/* ================================================
   HEADER
   ================================================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
    max-width: 960px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.verified-badge {
    font-size: 0.65rem;
    color: var(--red-crimson);
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(139, 0, 0, 0.15);
    border: 1px solid rgba(139, 0, 0, 0.25);
    transition: all var(--transition-base);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--red-soft);
}

.header-btn i {
    font-size: 0.7rem;
}

.header-btn:hover {
    background: rgba(139, 0, 0, 0.3);
    transform: scale(1.05);
}


/* ================================================
   PROFILE SECTION
   ================================================ */
.profile-section {
    position: relative;
}

.profile-banner {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.profile-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.profile-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(8,8,8,0.2) 0%, rgba(8,8,8,0.9) 100%);
}

.profile-info {
    position: relative;
    padding: 0 16px 20px;
    margin-top: -40px;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.profile-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--bg-primary);
    pointer-events: none;
}

.avatar-ring {
    position: absolute;
    inset: -3px;
    border-radius: var(--radius-full);
    border: 2px solid var(--red-crimson);
    animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.profile-name .verified-badge {
    font-size: 0.75rem;
}

.profile-bio {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.profile-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(139, 0, 0, 0.12);
    border: 1px solid rgba(139, 0, 0, 0.25);
    border-radius: var(--radius-full);
    color: var(--red-soft);
}

.profile-tag i {
    font-size: 0.6rem;
}


/* ================================================
   FILTER BAR
   ================================================ */
.filter-bar {
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 12px 0;
}

.filter-bar-inner {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    max-width: 960px;
    margin: 0 auto;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg-surface-2);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.filter-chip i {
    font-size: 0.7rem;
}

.filter-chip:hover {
    background: var(--bg-surface-3);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--gradient-cta);
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: 0 2px 12px rgba(220, 20, 60, 0.3);
}


/* ================================================
   CONTENT GRID
   ================================================ */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    padding: 3px;
    max-width: 960px;
    margin: 0 auto;
}

.media-card {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-surface);
    border-radius: 2px;
    opacity: 0;
    transform: scale(0.95);
    animation: cardReveal 0.4s ease forwards;
}

.media-card:nth-child(1) { animation-delay: 0.02s; }
.media-card:nth-child(2) { animation-delay: 0.04s; }
.media-card:nth-child(3) { animation-delay: 0.06s; }
.media-card:nth-child(4) { animation-delay: 0.08s; }
.media-card:nth-child(5) { animation-delay: 0.10s; }
.media-card:nth-child(6) { animation-delay: 0.12s; }
.media-card:nth-child(7) { animation-delay: 0.14s; }
.media-card:nth-child(8) { animation-delay: 0.16s; }
.media-card:nth-child(9) { animation-delay: 0.18s; }
.media-card:nth-child(10) { animation-delay: 0.20s; }

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.media-card .media-img,
.media-card .media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.media-card .media-video {
    object-fit: cover;
}

/* Video play icon overlay */
.media-card .video-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.media-card .video-icon i {
    font-size: 0.55rem;
    color: white;
    margin-left: 1px;
}

/* Card subtle overlay on bottom */
.media-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.media-card:hover .card-overlay {
    opacity: 1;
}

.media-card .card-date {
    position: absolute;
    bottom: 8px;
    left: 10px;
    font-size: 0.6rem;
    color: rgba(255,255,255,0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.media-card:hover .card-date {
    opacity: 1;
}

/* Featured card (bigger) */
.media-card.featured {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

/* Loading skeleton */
.media-card.skeleton {
    background: var(--bg-surface);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background: var(--bg-surface); }
    50% { background: var(--bg-surface-2); }
    100% { background: var(--bg-surface); }
}


/* ================================================
   SORTEIO MODAL
   ================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--bg-surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 2;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title i {
    color: var(--red-crimson);
    font-size: 1rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.modal-close:hover {
    background: var(--bg-surface-3);
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Raffle Card */
.raffle-card {
    text-align: center;
    padding: 28px 20px;
    background: var(--gradient-main);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(139, 0, 0, 0.3);
}

.raffle-icon-wrapper {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: rgba(220, 20, 60, 0.15);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--red-crimson);
}

.raffle-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.raffle-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Raffle Result */
.raffle-result {
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.04);
}

.raffle-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.raffle-result-header i {
    color: var(--red-blood);
    font-size: 0.65rem;
}

.raffle-date {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--red-crimson);
}

/* Raffle Winner */
.raffle-winner {
    text-align: center;
    padding: 24px 16px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
    border: 1px solid rgba(139, 0, 0, 0.2);
}

.raffle-winner-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--red-soft);
    margin-bottom: 10px;
}

.raffle-winner-label i {
    font-size: 0.6rem;
}

.raffle-winner-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.raffle-winner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: #22c55e;
}

.raffle-winner-badge i {
    font-size: 0.6rem;
}

/* Raffle Info */
.raffle-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.raffle-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.03);
}

.raffle-info-item i {
    color: var(--red-crimson);
    font-size: 0.85rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Raffle Footer */
.raffle-footer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: rgba(139, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.raffle-footer i {
    color: var(--red-blood);
    margin-top: 2px;
    flex-shrink: 0;
}


/* ================================================
   RESPONSIVE - TABLET
   ================================================ */
@media (min-width: 600px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        padding: 4px;
    }

    .profile-banner {
        height: 200px;
    }

    .profile-info {
        display: flex;
        align-items: flex-end;
        gap: 20px;
    }

    .profile-avatar-wrapper {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .modal-overlay {
        align-items: center;
    }

    .modal-container {
        border-radius: var(--radius-xl);
        transform: translateY(30px);
        max-height: 85vh;
    }

    .modal-overlay.open .modal-container {
        transform: translateY(0);
    }
}

/* ================================================
   RESPONSIVE - DESKTOP
   ================================================ */
@media (min-width: 960px) {
    .content-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .profile-banner {
        height: 240px;
    }

    .profile-avatar-wrapper {
        width: 96px;
        height: 96px;
    }

    .profile-avatar {
        width: 96px;
        height: 96px;
    }

    .profile-name {
        font-size: 1.6rem;
    }
}
