/**
 * MATCH NA VIRADA - Estilos Principais
 * Tema: Neon Festivo (Cyan + Pink)
 */

/* ============================================================
   VARIÁVEIS CSS
   ============================================================ */
:root {
    /* Cores Neon */
    --neon-cyan: #00f2ea;
    --neon-pink: #ff0055;
    --neon-purple: #b537f2;
    --neon-yellow: #f2e705;

    /* Backgrounds */
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.1);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-disabled: #666666;

    /* Gradientes */
    --gradient-neon: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
    --gradient-dark: linear-gradient(180deg, #0a0a0a, #1a1a1a);

    /* Sombras */
    --shadow-neon: 0 0 20px rgba(0, 242, 234, 0.3);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 242, 234, 0.5);

    /* Bordas */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;

    /* Espaçamentos */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--neon-pink);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   AMBIENT LIGHT (Fundo com gradiente)
   ============================================================ */
.ambient-light {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, rgba(0, 242, 234, 0.08), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 85, 0.08), transparent 40%);
    pointer-events: none;
}

/* Ruído/textura */
.ambient-light::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.5;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.container-sm {
    max-width: 600px;
}

.container-md {
    max-width: 900px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-glass {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.card-neon-border {
    position: relative;
    overflow: hidden;
}

.card-neon-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-neon);
}

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-neon {
    background: var(--gradient-neon);
    color: white;
    box-shadow: var(--shadow-neon);
}

.btn-neon:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
}

.btn-outline:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   INPUTS & FORMS
   ============================================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    background: var(--bg-input) !important;
    background-color: var(--bg-input) !important;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2300f2ea' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

select.form-control option {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.form-error {
    color: var(--neon-pink);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

/* Upload de múltiplas fotos */
.photo-upload-grid {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.photo-upload-grid::-webkit-scrollbar {
    height: 6px;
}

.photo-upload-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.photo-upload-grid::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 3px;
}

.photo-upload-slot {
    flex: 0 0 280px;
    aspect-ratio: 3/4;
    border: 2px dashed rgba(0, 242, 234, 0.2);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

.photo-upload-slot:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 242, 234, 0.05);
}

.photo-upload-slot.has-photo {
    border-style: solid;
    border-color: var(--neon-cyan);
}

.photo-upload-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    gap: 0.5rem;
}

.photo-upload-placeholder svg {
    width: 28px;
    height: 28px;
    opacity: 0.4;
    stroke: var(--neon-cyan);
}

.photo-upload-placeholder span {
    opacity: 0.6;
    font-weight: 500;
}

.photo-remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 0, 85, 0.9);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.photo-remove-btn:hover {
    background: var(--neon-pink);
    transform: scale(1.1);
}

/* ============================================================
   TAGS/BADGES
   ============================================================ */
.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 242, 234, 0.1);
    border: 1px solid var(--neon-cyan);
    border-radius: 20px;
    color: var(--neon-cyan);
    font-size: 0.875rem;
    margin: 0.25rem;
    transition: all 0.3s ease;
}

.tag-pink {
    background: rgba(255, 0, 85, 0.1);
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.tag-active {
    background: var(--neon-cyan);
    color: var(--bg-dark);
}

.tag-clickable {
    cursor: pointer;
}

.tag-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 242, 234, 0.3);
}

/* ============================================================
   PROFILE CARD (Swipe)
   ============================================================ */
.profile-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 3/4;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    cursor: grab;
    user-select: none;
}

.profile-card:active {
    cursor: grabbing;
}

.profile-card-image-container {
    width: 100%;
    height: 70%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

.profile-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.profile-card-image.active {
    opacity: 1;
}

.photo-dots {
    position: absolute;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.photo-dot {
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-dot.active {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* Botão Ver Perfil */
.btn-view-profile {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 242, 234, 0.3);
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 15;
}

.btn-view-profile:hover {
    background: rgba(0, 242, 234, 0.2);
    border-color: var(--neon-cyan);
    transform: scale(1.1);
}

/* Indicador de múltiplas fotos */
.photo-count-indicator {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 242, 234, 0.3);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--neon-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
}

.photo-count-indicator svg {
    opacity: 0.8;
}

/* Modal de Perfil Completo */
.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.profile-modal.active {
    display: flex;
}

.profile-modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.profile-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.profile-modal-close:hover {
    background: var(--neon-pink);
    color: white;
    transform: scale(1.1);
}

.profile-modal-photos {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    display: flex;
}

.profile-modal-photos::-webkit-scrollbar {
    display: none;
}

.profile-modal-photo {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

.profile-modal-info {
    padding: 1.5rem;
}

.profile-modal-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.profile-modal-bio {
    color: var(--text-secondary);
    margin: 1rem 0;
    font-style: italic;
}

.profile-card-info {
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.profile-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.profile-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.profile-card-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ============================================================
   SWIPE BUTTONS
   ============================================================ */
.swipe-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.swipe-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.swipe-btn-nope {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.swipe-btn-nope:hover {
    background: var(--neon-pink);
    color: white;
    transform: scale(1.1);
}

.swipe-btn-like {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.swipe-btn-like:hover {
    background: var(--neon-cyan);
    color: white;
    transform: scale(1.1);
}

/* ============================================================
   CHAT
   ============================================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    max-height: 700px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.message {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    word-wrap: break-word;
}

.message-sent {
    align-self: flex-end;
    background: var(--gradient-neon);
    color: white;
    border-radius: 18px 18px 4px 18px;
}

.message-received {
    align-self: flex-start;
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 18px 18px 18px 4px;
}

.message-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25rem;
}

.chat-input {
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: var(--spacing-sm);
}

.chat-input input {
    flex: 1;
}

/* ============================================================
   BOTTOM NAV (Mobile)
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(0, 242, 234, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0 0.75rem 0;
    z-index: 100;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
}

.bottom-nav-item:hover {
    color: var(--neon-cyan);
    background: rgba(0, 242, 234, 0.05);
    transform: translateY(-2px);
}

.bottom-nav-item.active {
    color: var(--neon-cyan);
    background: rgba(0, 242, 234, 0.1);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    border-radius: 0 0 3px 3px;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 6px currentColor);
    transition: all 0.3s ease;
}

.bottom-nav-item.active svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 0 10px currentColor);
    animation: pulse 2s ease-in-out infinite;
}

.bottom-nav-item:hover svg {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px currentColor);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .profile-card {
        max-width: 450px;
    }

    .bottom-nav {
        display: none;
    }
}

@media (max-width: 767px) {
    body {
        padding-bottom: 85px; /* Espaço para bottom nav maior */
    }
}
