:root {
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #f3f4f6;
    --secondary-hover: #e5e7eb;
    --background: #fdfbff;
    --surface: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navbar */
.navbar {
    background-color: var(--surface);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 100px;
    height: 10vh;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.25);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--secondary);
    border-color: var(--secondary-hover);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    box-shadow: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #8b5cf6, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.cta-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Chat Interface */
.chat-container {
    padding: 2rem 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 2rem;
}

.video-wrapper {
    position: relative;
    background-color: #000;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

video {
    transform: scaleX(-1);
}

.label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.waiting-overlay {
    position: absolute;
    inset: 0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.waiting-overlay.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.controls {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: var(--surface);
    padding: 1rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

.gender-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

select {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
}

/* Chat Box */
.chat-box {
    width: 100%;
    max-width: 600px;
    margin-top: 2rem;
    background: var(--surface);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--background);
}

.chat-input-area {
    padding: 1rem;
    background: var(--surface);
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--border);
}

#chatInput {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--secondary);
    color: var(--text);
    outline: none;
    transition: all 0.2s;
}

#chatInput:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

#chatInput:disabled,
#sendBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chat Bubbles */
.message {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.2s ease-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message.self {
    align-self: flex-end;
    background-color: var(--primary);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message.stranger {
    align-self: flex-start;
    background-color: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 0.25rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    color: var(--text-muted);
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.system-message {
    align-self: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}