/* ======================================
   NETFLIX - PÁGINA DE SELEÇÃO DE PERFIL
   ====================================== */

/* =============== RESET GLOBAL =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 50%, #0a0a0a 100%);
    color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =============== HEADER ESTILO NETFLIX =============== */
header {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
    padding: 20px 50px;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.netflix-logo {
    font-size: 2rem;
    font-weight: 900;
    color: #e50914;
    letter-spacing: -2px;
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
    font-style: italic;
}

/* =============== MAIN CONTENT =============== */
main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 40px 50px;
}

.perfis-section {
    text-align: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.titulo-principal {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.subtitulo {
    font-size: 1.1rem;
    color: #b3b3b3;
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

/* =============== CONTAINER DE PERFIS =============== */
.perfis-container {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: nowrap;
    margin: 0 auto;
}

.perfis-container li {
    cursor: pointer;
    flex: 0 0 auto;
    width: 180px;
}

/* =============== CARD DO PERFIL =============== */
.perfil {
    position: relative;
    transition: all 0.3s ease;
}

.perfil-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    width: 100%;
}

.perfil figure {
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 8px;
}

.perfil img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.perfil figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7), transparent);
    padding: 30px 15px 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============== OVERLAY COM BOTÃO DE EDIÇÃO =============== */
.perfil-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.btn-edit {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #000;
}

.btn-edit:hover {
    background: #e50914;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

/* =============== EFEITOS HOVER DO PERFIL =============== */
.perfil:hover {
    transform: scale(1.05);
}

.perfil:hover .perfil-wrapper {
    box-shadow: 0 8px 30px rgba(229, 9, 20, 0.4);
}

.perfil:hover img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.perfil:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

.perfil:hover .perfil-overlay {
    opacity: 1;
}

/* =============== FOOTER =============== */
footer {
    background: #0a0a0a;
    border-top: 1px solid #222;
    padding: 40px 50px 30px;
    text-align: center;
}

footer p {
    font-size: 0.85rem;
    color: #808080;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* =============== RESPONSIVIDADE =============== */

/* Desktop Grande (1441px+) */
@media (min-width: 1441px) {
    .titulo-principal {
        font-size: 4rem;
    }

    main {
        padding: 80px 60px;
    }
}

/* Desktop Normal (1201px - 1440px) */
@media (max-width: 1440px) and (min-width: 1201px) {
    .perfis-container {
        gap: 40px;
    }

    .titulo-principal {
        font-size: 3.5rem;
    }
}

/* Tablet Grande (1025px - 1200px) */
@media (max-width: 1024px) {
    header {
        padding: 20px 30px;
    }

    .titulo-principal {
        font-size: 2.8rem;
    }

    .perfis-container {
        gap: 25px;
    }

    .perfis-container li {
        width: 150px;
    }

    .perfil img {
        height: 150px;
    }

    main {
        padding: 50px 30px;
    }

    footer {
        padding: 30px 30px 20px;
    }
}

/* Tablet Pequeno (769px - 1024px) */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .netflix-logo {
        font-size: 1.5rem;
    }

    .titulo-principal {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }

    .subtitulo {
        font-size: 0.95rem;
        margin-bottom: 40px;
    }

    .perfis-container {
        gap: 20px;
    }

    .perfis-container li {
        width: 130px;
    }

    .perfil img {
        height: 130px;
    }

    main {
        padding: 40px 20px;
    }

    .btn-edit {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Celular Grande (481px - 768px) */
@media (max-width: 480px) {
    header {
        padding: 12px 15px;
    }

    .netflix-logo {
        font-size: 1.3rem;
    }

    .titulo-principal {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }

    .subtitulo {
        font-size: 0.85rem;
        margin-bottom: 30px;
    }

    .perfis-container {
        gap: 15px;
    }

    .perfis-container li {
        width: 110px;
    }

    .perfil img {
        height: 110px;
    }

    main {
        padding: 30px 15px;
        min-height: calc(100vh - 100px);
    }

    .perfil:hover {
        transform: scale(1.02);
    }

    .perfil figcaption {
        font-size: 1rem;
        padding: 35px 15px 15px;
    }

    .btn-edit {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    footer {
        padding: 20px 15px 15px;
    }

    footer p {
        font-size: 0.75rem;
    }
}

/* Celular Pequeno (até 375px) */
@media (max-width: 375px) {
    .netflix-logo {
        font-size: 1.1rem;
    }

    .titulo-principal {
        font-size: 1.5rem;
    }

    .subtitulo {
        font-size: 0.8rem;
    }

    .perfis-container {
        gap: 12px;
    }

    main {
        padding: 20px 10px;
    }

    .perfil figcaption {
        font-size: 0.9rem;
        padding: 30px 12px 12px;
    }

    .btn-edit {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

/* Landscape (celular em modo horizontal) */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        padding: 10px 20px;
    }

    .titulo-principal {
        font-size: 1.5rem;
        margin-bottom: 3px;
    }

    .subtitulo {
        font-size: 0.75rem;
        margin-bottom: 15px;
    }

    .perfis-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    main {
        padding: 15px 20px;
        min-height: calc(100vh - 80px);
    }

    .perfil img {
        height: 120px;
    }

    .perfil figcaption {
        font-size: 0.8rem;
        padding: 20px 10px 8px;
    }

    .btn-edit {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    footer {
        padding: 10px 20px;
    }

    footer p {
        font-size: 0.7rem;
    }
}

/* Telas Retina/High-DPI */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .perfil img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    .titulo-principal, .subtitulo {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }

    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Impressão */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    header {
        background: none !important;
        padding: 10px !important;
    }

    .titulo-principal {
        color: black !important;
        text-shadow: none !important;
    }

    .perfis-container {
        display: block !important;
    }

    .perfil {
        display: inline-block !important;
        width: 45% !important;
        margin: 5px 2.5% !important;
        page-break-inside: avoid;
    }

    .perfil img {
        filter: none !important;
    }

    .perfil-overlay {
        display: none !important;
    }

    footer {
        background: white !important;
        border-top: 1px solid #ccc !important;
    }
}

/* Animação de entrada */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.perfis-container li {
    animation: fadeInScale 0.6s ease-out backwards;
}

.perfis-container li:nth-child(1) { animation-delay: 0.1s; }
.perfis-container li:nth-child(2) { animation-delay: 0.2s; }
.perfis-container li:nth-child(3) { animation-delay: 0.3s; }
.perfis-container li:nth-child(4) { animation-delay: 0.4s; }
