/* ========== MODERN RESET & VARS ========== */
:root {
    --primary-gradient: linear-gradient(135deg, #FF512F 0%, #DD2476 100%); 
    --hover-gradient: linear-gradient(135deg, #ff6b4a 0%, #e63e8a 100%);
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-sec: #6b7280;
    --accent: #DD2476;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========== HEADER HERO ========== */
.main-header {
    background: #fff;
    padding: 30px 20px 25px; /* Padding ajustat */
    text-align: center;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 5px;
    background: var(--primary-gradient);
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}
.logo .highlight { color: var(--accent); }

.subtitle {
    color: var(--text-sec);
    font-size: 15px;
    margin-bottom: 20px;
}

/* NOUL BUTON JOINDRE DIN HEADER - LATIME COMPLETA */
.header-join-btn {
    display: block;                  /* Modificat din inline-block */
    width: 100%;                     /* Ocupa toata latimea disponibila */
    max-width: 500px;                /* Dar nu mai mult de 500px (la fel ca search) */
    margin: 20px auto 0;             /* Centrat pe mijloc */
    background: var(--accent);
    color: white;
    padding: 12px 25px;              /* Putin mai inalt */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(221, 36, 118, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.header-join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(221, 36, 118, 0.4);
    background: var(--primary-gradient);
}

/* ========== SEARCH BOX ========== */
.search-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    padding: 6px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 500px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: #fbcfe8;
}

.search-icon {
    margin-left: 15px;
    color: #9ca3af;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-main);
}

.search-box button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.search-box button:hover { opacity: 0.9; }

/* ========== FOOTER & LEGAL LINKS ========== */
.main-footer {
    margin-top: auto; /* Împinge footerul jos de tot */
    padding: 40px 20px;
    background: #fff;
    text-align: center;
    border-top: 1px solid #eee;
}

.legal-links-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.legal-links-container:hover {
    opacity: 1;
}

.legal-links-container a {
    font-size: 11px;                
    font-weight: 600;
    text-transform: uppercase;       
    letter-spacing: 0.5px;
    color: #9ca3af;                  
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Linie fină la hover */
.legal-links-container a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.legal-links-container a:hover {
    color: var(--accent);
}

.legal-links-container a:hover::after {
    width: 100%;
}

.separator {
    color: #e5e7eb;
    font-size: 10px;
}

/* ========== GRID & CONTAINER ========== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
    width: 100%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* ========== CARD DESIGN ========== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0,0,0,0.02);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Image Area */
.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 120%; /* Portrait ratio */
    overflow: hidden;
    background: #000;
}

.card-image-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

/* Online Badge */
.card-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 3;
    pointer-events: none;
}

.pulse-dot {
    width: 8px; height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    position: relative;
}
.pulse-dot::after {
    content: '';
    position: absolute;
    top: -4px; left: -4px;
    right: -4px; bottom: -4px;
    border-radius: 50%;
    border: 2px solid #10B981;
    animation: pulse 1.5s infinite;
    opacity: 0.5;
}
@keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* Card Body */
.card-body {
    padding: 20px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #111;
}

.verified-icon svg {
    display: block;
}

.location-text {
    font-size: 13px;
    color: var(--text-sec);
    margin-bottom: 12px;
    font-weight: 500;
}

.desc-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 20px;
    height: 42px; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.btn-primary {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary-gradient);
    color: white;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: box-shadow 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background: var(--hover-gradient);
    box-shadow: 0 4px 12px rgba(221, 36, 118, 0.3);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-sec);
    font-size: 18px;
}

/* ========== VIDEO REELS STYLES ========== */
.video-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    cursor: pointer;
}

.video-container video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: blur(5px);
    transition: filter 0.3s ease;
}

.video-container.playing video {
    filter: none;
}

.play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(0, 0, 0, 0.4); 
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 3px; 
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    backdrop-filter: blur(2px);
    z-index: 2;
}

.video-container.playing .play-overlay {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
}

.video-container.playing + .card-badge {
    opacity: 0.3;
}

/* ========== PROFILE PAGE ========== */
.profile-page-body {
    background: #e5e7eb; 
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex-direction: column; /* Important pentru link-urile legale sub profil */
}

.profile-modal {
    background: #fff;
    width: 1000px;
    max-width: 100%;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.profile-header {
    position: absolute;
    top: 20px; left: 20px;
    z-index: 10;
}

.close-btn {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
    font-weight: bold;
}
.close-btn:hover { background: #fff; }

.profile-content-grid {
    display: grid;
    grid-template-columns: 45% 55%;
}

.profile-image-col {
    position: relative;
    height: 600px; 
    background: #000;
}

.profile-image-col img, .profile-image-col video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge-overlay {
    position: absolute;
    bottom: 20px; left: 20px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.profile-info-col {
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.name-row h1 { font-size: 36px; color: #111; margin: 0; }
.check-badge { 
    background: #dbeafe; color: #1e40af; 
    padding: 4px 10px; border-radius: 8px; 
    font-size: 13px; font-weight: 600; 
}

.location-tag {
    font-size: 18px;
    color: var(--text-sec);
    margin-bottom: 20px;
    font-weight: 500;
}

.separator-line {
    height: 1px;
    background: #e5e7eb;
    margin: 20px 0;
}

.bio-box h3 { font-size: 16px; text-transform: uppercase; color: #9ca3af; letter-spacing: 1px; margin-bottom: 10px; }
.bio-box p { font-size: 16px; line-height: 1.7; color: #374151; margin-bottom: 30px; }

.cta-hint { font-size: 14px; color: var(--accent); margin-bottom: 10px; font-weight: 500; text-align: center; }

/* ========== CHAT STYLES ========== */
.chat-container {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 350px;
    background: #f9fafb;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative; 
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px; 
}

.chat-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 20px;
    text-align: center;
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: popIn 0.3s ease;
}

@keyframes popIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.message-wrapper.bot { align-self: flex-start; }
.message-wrapper.user { align-self: flex-end; align-items: flex-end; }

.sender-name {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 4px;
    margin-left: 10px; 
}

.message-wrapper.user .sender-name { margin-left: 0; margin-right: 10px; }

.message-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.message-wrapper.bot .message-bubble {
    background: #e5e7eb;
    color: #1f2937;
    border-bottom-left-radius: 4px;
}

.message-wrapper.user .message-bubble {
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 4px;
}

.typing-indicator span {
    display: inline-block;
    width: 6px; height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

.chat-controls {
    padding: 10px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

.chat-controls input {
    flex: 1;
    border: 1px solid #e5e7eb;
    padding: 10px 15px;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.chat-controls button {
    background: var(--accent);
    color: white;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.chat-controls button:hover { background: #be1e63; }

/* ========== LEGAL PAGES ========== */
.legal-page {
    background-color: #f9fafb;
    color: #333;
    line-height: 1.7;
    padding: 0;
}

.legal-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.legal-container h1 {
    font-size: 24px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent);
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-back {
    display: inline-block;
    margin-bottom: 25px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s;
}
.btn-back:hover { transform: translateX(-3px); }

.legal-content {
    font-size: 14px;
    color: #4b5563;
}

/* ========== LIMIT REACHED BANNER ========== */
.register-limit-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

.register-limit-box h3 {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 10px;
}

.register-limit-box p {
    color: var(--text-sec);
    margin-bottom: 20px;
}

.btn-register {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(221, 36, 118, 0.4);
    transition: transform 0.2s;
}

.btn-register:hover {
    transform: translateY(-2px);
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .profile-content-grid { grid-template-columns: 1fr; }
    .profile-image-col { height: 400px; }
    .profile-info-col { padding: 20px; }
    .profile-modal { width: 100%; border-radius: 0; min-height: 100vh; box-shadow: none; }
    .profile-page-body { padding: 0; align-items: flex-start; }
}

@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr; gap: 20px; }
    .main-header { padding: 20px 15px 30px; border-radius: 0 0 20px 20px; }
    .search-box { width: 100%; padding: 4px; }
    .search-box button { padding: 10px 12px; font-size: 13px; white-space: nowrap; }
    .search-box input { font-size: 14px; min-width: 0; }
    
    .legal-container { margin: 0; padding: 25px; border-radius: 0; box-shadow: none; }
    .legal-links-container { margin-top: 20px; margin-bottom: 20px; }
}