/* --- Diretrizes UI/UX: Interatividade, Seleção e Prevenção de Drag --- */
/* Containers interativos, 3D, botões e modais */
.interactive,
button,
.btn,
.social-btn,
.work-invite-card,
.modal-card,
.link-item {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Mídias e ícones decorativos ou internos */
img,
svg,
.media-inner {
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Textos adornos e informativos não selecionáveis */
.badge,
.tag,
.ornament,
.non-selectable,
.crp-badge,
.work-invite-tag,
.instruction {
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* --- Configurações Gerais --- */
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

/* --- O Palco 3D --- */
.scene {
    width: 350px;
    height: 200px;
    perspective: 1000px;
    /* Cria a profundidade */
    cursor: grab;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.scene:active {
    cursor: grabbing;
}

/* --- O Objeto Cartão --- */
.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    /* Essencial para o 3D */
    transition: transform 0.1s ease-out;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* --- Espessura 3D do Cartão --- */
.card-edge {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: #d0d7de;
    border: 1px solid #b0babf;
    box-sizing: border-box;
    pointer-events: none;
}

/* --- Estilos Comuns Frente e Verso --- */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    /* Oculta a parte de trás da face */
    border-radius: 15px;
    display: flex;
    overflow: hidden;
    background: white;
    border: 1px solid #e0e0e0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* --- Frente do Cartão --- */
.card-front {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px 10px 15px 30px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #ffffff 60%, #e6f7f8 100%);
    transform: translateZ(3px);
}

.photo-area {
    width: 105px;
    height: 105px;
    border-radius: 50%;
    overflow: hidden;
    border: 3.5px solid #008B8B;
    /* Dark Cyan - Cor de destaque visual */
    box-shadow: 0 4px 12px rgba(0, 139, 139, 0.25);
    margin-right: 18px;
    flex-shrink: 0;
}

.photo-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    pointer-events: none;
}

.info-area {
    color: #333;
}

.info-area h1 {
    font-size: 20px;
    margin: 0 0 5px 0;
    color: #2c3e50;
    /* text-transform: uppercase; */
    letter-spacing: 0.5px;
}

.info-area p {
    font-size: 16px;
    margin: 0;
    color: #666;
}

.crp-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    background-color: #008B8B;
    color: white;
    font-size: 14px;
    border-radius: 4px;
    font-weight: bold;
}

/* --- Verso do Cartão --- */
.card-back {
    transform: rotateY(180deg) translateZ(3px);
    /* Inicia virado para trás com offset Z */
    background: linear-gradient(135deg, #1e293b 0%, #2c3e50 100%);
    color: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.back-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #e2e8f0;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    /* -> Largura Máxima da area dos botões (para ficar em uma linha ou duas) --------*/
    max-width: 300px;
}

.social-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    box-sizing: border-box;
    cursor: pointer;
    outline: none;
}

.social-btn svg {
    width: 25px;
    height: 25px;
    aspect-ratio: 1 / 1;
    fill: currentColor;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    display: block;
    pointer-events: none;
}

.social-btn:hover {
    transform: translateY(-4px) scale(1.12);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    color: white;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.social-btn.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: #d6249f;
    color: white;
    box-shadow: 0 8px 20px rgba(214, 36, 159, 0.4);
}

.social-btn.tiktok:hover {
    background: #000000;
    border-color: #25F4EE;
    color: white;
    box-shadow: -2px 2px 10px rgba(37, 244, 238, 0.5), 2px -2px 10px rgba(254, 44, 85, 0.5);
}

.social-btn.youtube:hover {
    background: #FF0000;
    border-color: #FF0000;
    color: white;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

.social-btn.linkedin:hover {
    background: #0A66C2;
    border-color: #0A66C2;
    color: white;
    box-shadow: 0 8px 20px rgba(10, 102, 194, 0.45);
}

.social-btn.twitter:hover {
    background: #000000;
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.social-btn.telegram:hover {
    background: #229ED9;
    border-color: #229ED9;
    color: white;
    box-shadow: 0 8px 20px rgba(34, 158, 217, 0.45);
}

.social-btn.extra-links:hover {
    background: linear-gradient(135deg, #008B8B 0%, #00b3b3 100%);
    border-color: #008B8B;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 139, 139, 0.4);
}

/* --- Tela Sobreposta (Modal de Expansão de Links) --- */
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    box-sizing: border-box;
}

.overlay-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    transform: scale(0.92) translateY(15px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.overlay-backdrop.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
}

.modal-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #008B8B;
    flex-shrink: 0;
}

.modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    pointer-events: none;
}

.modal-header-info h2 {
    margin: 0;
    font-size: 17px;
    color: #1e293b;
    font-weight: 700;
}

.modal-header-info p {
    margin: 3px 0 0 0;
    font-size: 13px;
    color: #64748b;
}

.modal-body {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 2px;
    padding-right: 5px
}

.modal-body::-webkit-scrollbar {
    width: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    cursor: pointer;
}

.link-item:hover {
    background: #ffffff;
    border-color: #008B8B;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 139, 139, 0.12);
}

.link-item:hover .link-arrow {
    transform: translateX(3px);
    color: #008B8B;
}

.link-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.link-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.link-icon.schedule {
    background: linear-gradient(135deg, #008B8B, #00b3b3);
}

.link-icon.website {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.link-icon.location {
    background: linear-gradient(135deg, #ea580c, #f97316);
}

.link-icon.email {
    background: linear-gradient(135deg, #475569, #64748b);
}

.link-icon.telegram {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.link-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.link-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.link-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.link-arrow {
    width: 20px;
    height: 20px;
    fill: currentColor;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

/* Instrução abaixo do cartão */
.instruction {
    margin-top: 25px;
    color: #777;
    font-size: 13.5px;
    letter-spacing: 0.3px;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* --- Card de Convite: Conhecer o Trabalho ---   duplicadas " work/book " */
.work-invite-card,
.book-invite-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 350px;
    max-width: calc(100vw - 40px);
    margin-top: 16px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 139, 139, 0.22);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 139, 139, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.work-invite-card:hover,
.book-invite-card:hover {
    background: #ffffff;
    border-color: #008B8B;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 139, 139, 0.16), 0 4px 10px rgba(0, 0, 0, 0.03);
}

.work-invite-card:active,
.book-invite-card:active {
    transform: translateY(0) scale(0.99);
}

.work-invite-icon,
.book-invite-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #008B8B, #00b3b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 139, 139, 0.25);
    transition: transform 0.3s ease;
}

.work-invite-card:hover .work-invite-icon,
.book-invite-card:hover .book-invite-icon {
    transform: scale(1.06);
}

.work-invite-icon svg,
.book-invite-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    pointer-events: none;
    -webkit-user-drag: none;
}

.work-invite-info,
.book-invite-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.work-invite-tag,
.book-invite-tag {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #008B8B;
    margin-bottom: 2px;
}

.work-invite-title,
.book-invite-title {
    font-size: 13.5px;
    color: #2c3e50;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-invite-title strong,
.book-invite-title strong {
    color: #008B8B;
    font-weight: 600;
}

.work-invite-arrow,
.book-invite-arrow {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, color 0.25s ease;
}

.work-invite-arrow svg,
.book-invite-arrow svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    pointer-events: none;
}

.work-invite-card:hover .work-invite-arrow,
.book-invite-card:hover .book-invite-arrow {
    transform: translateX(4px);
    color: #008B8B;
}

/* --- Widget QR Code Acesso Mobile (Desktop) --- */
.qr-mobile-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.qr-mobile-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #555555;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    pointer-events: none;
}

.qr-mobile-icon {
    width: 15px;
    height: 15px;
    fill: currentColor;
    pointer-events: none;
}

.qr-mobile-frame {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-mobile-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Oculta em telas de smartphones ou telas menores onde o usuário já está no mobile */
@media (max-width: 820px),
(max-height: 560px) {
    .qr-mobile-widget {
        display: none !important;
    }
}

/* --- Crédito do Desenvolvedor (Canto Direito Inferior) --- */
.developer-credit {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    font-size: 12px;
    font-weight: 500;
    color: #555555;
    letter-spacing: 0.3px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.developer-credit a {
    color: #555555;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.developer-credit a:hover {
    color: #008B8B;
    text-decoration: underline;
}

@media (max-width: 820px) {
    .developer-credit {
        bottom: 16px;
        right: 16px;
    }
}