@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f28;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.07);
    --accent-1: #a855f7;
    --accent-2: #ec4899;
    --accent-3: #6366f1;
    --gradient-main: linear-gradient(135deg, #a855f7, #ec4899);
    --gradient-blue: linear-gradient(135deg, #6366f1, #a855f7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.1);
    --shadow-card: 0 25px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(168, 85, 247, 0.2);
    --online: #22c55e;
    --away: #f59e0b;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── BACKGROUND BLOBS ── */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    left: -20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── NAVBAR ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.online-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--online);
    font-weight: 500;
}

.online-count::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--online);
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

/* ── HERO BANNER ── */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero h1 span {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto 30px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 100px;
    padding: 6px 18px;
    font-size: 0.8rem;
    color: var(--accent-1);
    font-weight: 500;
    margin-bottom: 20px;
}

/* ── PROFILE GRID ── */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
    position: relative;
    z-index: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

/* ── PROFILE CARD ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    text-decoration: none;
    display: block;
}

.card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    border-color: rgba(168, 85, 247, 0.4);
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: #12122a;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(10, 10, 26, 0.95));
    padding: 50px 16px 16px;
}

.status-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-online .status-dot {
    background: var(--online);
    animation: pulse-dot 1.5s infinite;
}

.status-away .status-dot {
    background: var(--away);
}

.status-online {
    color: var(--online);
}

.status-away {
    color: var(--away);
}

.card-body {
    padding: 18px 20px 22px;
}

.card-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.card-bio {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-view {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    border-radius: var(--radius-sm);
    background: var(--gradient-main);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    letter-spacing: 0.3px;
}

.btn-view:hover {
    opacity: 0.9;
    transform: scale(0.98);
}

/* ── PROFILE PAGE ── */
.profile-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px 80px;
    position: relative;
    z-index: 1;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 28px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--accent-1);
}

.back-btn svg {
    transition: transform 0.2s;
}

.back-btn:hover svg {
    transform: translateX(-4px);
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 10%;
    border: 3px solid rgba(168, 85, 247, 0.5);
    flex-shrink: 0;
    background: #12122a;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.profile-info .meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.profile-info .bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    border-radius: 100px;
    padding: 3px 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── GALLERY ── */
.gallery-section {
    margin-bottom: 30px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.gallery-main {
    width: 100%;
    height: 420px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
    cursor: zoom-in;
    background: #12122a;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transition: transform 0.4s ease;
}

.gallery-main:hover img {
    transform: scale(1.04);
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gallery-thumb {
    height: 110px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    background: #12122a;
}

.gallery-thumb.active {
    border-color: var(--accent-1);
}

.gallery-thumb:hover {
    transform: scale(1.04);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

/* ── ACTION BUTTONS ── */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 10px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 24px;
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: transform 0.25s, box-shadow 0.25s, opacity 0.2s;
}

.btn-chat {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4);
}

.btn-video {
    background: var(--gradient-blue);
    color: #fff;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-action:hover {
    transform: translateY(-3px);
    opacity: 0.92;
}

.btn-action svg {
    flex-shrink: 0;
}

/* ── CHAT PAGE ── */
.chat-wrapper {
    max-width: 680px;
    margin: 40px auto;
    padding: 0 20px 60px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.chat-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(168, 85, 247, 0.5);
}

.chat-header-info h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
}

.chat-header-info span {
    font-size: 0.75rem;
    color: var(--online);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.msg {
    display: flex;
    flex-direction: column;
    max-width: 72%;
    animation: msgFadeIn 0.3s ease;
}

.msg.received {
    align-self: flex-start;
}

.msg.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.msg-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

.msg.received .msg-bubble {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.msg.sent .msg-bubble {
    background: var(--gradient-main);
    border-bottom-right-radius: 4px;
    color: #fff;
}

.msg-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.typing-indicator {
    align-self: flex-start;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    padding: 12px 18px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    display: none;
    align-items: center;
    gap: 4px;
}

.typing-indicator.visible {
    display: flex;
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-top: 10px;
    backdrop-filter: blur(10px);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    resize: none;
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 40px;
    height: 40px;
    background: var(--gradient-main);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.1);
}

.send-btn:active {
    transform: scale(0.95);
}

/* ── VIDEO PAGE ── */
.video-wrapper {
    width: 100%;
    height: 100svh;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(2px) brightness(0.4);
    transform: scale(1.05);
    transition: filter 1s ease;
}

.video-bg.connected {
    filter: blur(0) brightness(0.55);
}

.video-self {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 160px;
    border-radius: var(--radius-md);
    background: #1a1a2e;
    border: 2px solid rgba(168, 85, 247, 0.6);
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-self-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.video-caller-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 5;
}

.video-caller-name img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 14px;
    animation: ringPulse 2s infinite;
}

.video-caller-name h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.video-caller-name p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 6px;
}

.video-caller-name.connected img {
    animation: none;
}

.video-status {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

.video-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 20;
}

.ctrl-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
    backdrop-filter: blur(10px);
}

.ctrl-btn:hover {
    transform: scale(1.12);
}

.ctrl-btn.mute {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.ctrl-btn.camera {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.ctrl-btn.end {
    width: 70px;
    height: 70px;
    background: #ef4444;
    color: #fff;
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
}

.ctrl-btn.toggled {
    background: rgba(255, 255, 255, 0.4);
}

/* ── FOOTER ── */
.site-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 24px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
    margin-top: 20px;
}

/* ── ANIMATIONS ── */
@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-6px);
    }
}

@keyframes msgFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ringPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4);
    }

    50% {
        box-shadow: 0 0 0 18px rgba(168, 85, 247, 0);
    }
}

@keyframes connecting {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .hero {
        padding: 40px 16px 30px;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar {
        width: 90px;
        height: 90px;
    }

    .gallery-main {
        height: 280px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .gallery-thumb {
        height: 80px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .video-self {
        width: 90px;
        height: 120px;
        top: 14px;
        right: 14px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 12px 16px;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .grid {
        gap: 18px;
    }

    .chat-wrapper {
        padding: 0 12px 20px;
    }

    .btn-action {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}