/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

:root {
    --primary: #8B5CF6;
    --primary-light: #A78BFA;
    --primary-dark: #7C3AED;
    --secondary: #EC4899;
    --secondary-light: #F472B6;
    --background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.98);
    --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    --text: #1F2937;
    --text-light: #6B7280;
    --text-white: #FFFFFF;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Body and Background */
body {
    background: var(--background);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: auto;
    animation: gradientBG 15s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Main App Container */
.app-container {
    width: 100%;
    max-width: 420px;
    min-height: 700px;
    height: 85vh;
    background: var(--card-bg);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    position: relative;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: containerFloat 6s ease-in-out infinite;
}

@keyframes containerFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Page System */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 1;
    transform: translateX(30px);
}

.page.active {
    opacity: 1;
    pointer-events: all;
    z-index: 2;
    transform: translateX(0);
}

.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px;
    overflow-y: auto;
}

/* Page 1: Welcome Screen */
.welcome-animation {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 20px auto 32px;
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: pulse 3s ease-out infinite;
}

.pulse-ring:nth-child(2) {
    animation-delay: 1s;
}

.pulse-ring:nth-child(3) {
    animation-delay: 2s;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.logo-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
}

.logo-center i {
    font-size: 42px;
    color: white;
}

.page-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 32px;
    text-align: center;
    max-width: 320px;
}

/* Selection Cards */
.selection-container {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.selection-group {
    margin-bottom: 28px;
}

.selection-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.5px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-items: center;
}

.selection-card {
    width: 100%;
    max-width: 100px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(139, 92, 246, 0.1);
    border-radius: var(--border-radius);
    padding: 20px 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.selection-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.15);
}

.selection-card.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
}

.selection-card.active .card-label,
.selection-card.active .card-icon {
    color: white;
}

.card-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--primary);
    transition: var(--transition-fast);
}

.card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition-fast);
}

/* Age Check */
.age-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 28px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    border: 2px solid rgba(139, 92, 246, 0.1);
    width: 100%;
    max-width: 360px;
}

.checkbox-custom {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.checkbox-custom input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-design {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 6px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-custom input:checked ~ .checkbox-design {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
}

.checkbox-design i {
    color: white;
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition-fast);
}

.checkbox-custom input:checked ~ .checkbox-design i {
    opacity: 1;
    transform: scale(1);
}

.age-text {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

/* Primary Button */
.primary-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.25);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
}

.primary-btn:disabled {
    background: rgba(139, 92, 246, 0.2);
    color: rgba(139, 92, 246, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Action Buttons Group */
.action-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.call-btn {
    background: linear-gradient(135deg, var(--success), #059669);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
}

/* Progress Dots */
.progress-dots {
    display: flex;
    gap: 10px;
    margin-top: 32px;
    justify-content: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    transition: var(--transition-fast);
}

.dot.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: scale(1.2);
}

/* Page 2: Security Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 32px 0;
    width: 100%;
    max-width: 360px;
    justify-items: center;
}

.feature-item {
    width: 100%;
    max-width: 160px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    padding: 20px 16px;
    text-align: center;
    border: 2px solid rgba(139, 92, 246, 0.1);
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    box-shadow: 0 15px 25px rgba(139, 92, 246, 0.15);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

.feature-icon i {
    font-size: 24px;
    color: white;
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.feature-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Page 3: Chat Interface */
.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}

.chat-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-badge {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-badge i {
    font-size: 20px;
    color: white;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Chat Area */
.chat-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: rgba(248, 250, 252, 0.5);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.message {
    max-width: 75%;
    padding: 14px 18px;
    border-radius: 20px;
    position: relative;
    animation: messagePop 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.message.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.95);
    border-bottom-left-radius: 4px;
}

.message.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-bottom-right-radius: 4px;
}

.message-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 500;
}

.message-status {
    font-size: 11px;
    margin-left: 6px;
    opacity: 0.8;
}

.typing-indicator {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 20px;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    margin-bottom: 5px;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.typing-dots {
    display: flex;
    gap: 5px;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    display: block;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes messagePop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Full Call View */
.full-call-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #0F172A;
    z-index: 100;
}

.call-header {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
}

.call-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.call-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

.call-user-details h3 {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 6px;
}

.call-user-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94A3B8;
    font-size: 0.9rem;
}

.call-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.call-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #10B981;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 10px;
}

.call-minimize-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.call-minimize-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.status-badge {
    background: linear-gradient(to right, #10B981, #059669);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.video-container {
    flex: 1;
    background: #0F172A;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder {
    text-align: center;
    padding: 25px;
    max-width: 500px;
}

.video-placeholder i {
    font-size: 6rem;
    margin-bottom: 15px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.video-placeholder h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: white;
}

.video-placeholder p {
    color: #94A3B8;
    font-size: 1rem;
    margin-bottom: 25px;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.loading-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 1.5s infinite ease-in-out;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

.call-controls {
    padding: 20px 25px;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    justify-content: center;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 1.6rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}

.control-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.control-btn:hover::after {
    opacity: 1;
}

.mute-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.cut-btn {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

.skip-btn {
    background: linear-gradient(135deg, #10B981, #059669);
}

.speaker-btn {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

/* Floating Call Window */
.floating-call-window {
    position: fixed;
    top: 90px;
    right: 30px;
    width: 320px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: top right;
}

.floating-call-window.active {
    display: block;
    animation: floatIn 0.4s ease-out;
}

.floating-call-window.minimized {
    width: 200px;
    height: 50px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.floating-call-window.minimized:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.floating-call-window.minimized .floating-body,
.floating-call-window.minimized .floating-controls {
    display: none;
}

.floating-call-window.minimized .floating-header {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: none;
}

.floating-call-window.minimized .floating-minimize-btn {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .floating-call-window {
        position: fixed;
        top: 50%;
        right: 50%;
        transform: translate(50%, -50%);
        left: auto;
        width: 90vw;
        max-width: 320px;
        max-height: 90vh;
        transform-origin: center;
    }
    
    .floating-call-window.minimized {
        width: 200px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        top: auto;
        transform: translate(0, 0);
    }
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.floating-header {
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
}

.floating-header h3 {
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.floating-header i {
    color: var(--primary);
}

.floating-minimize-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 10px;
}

.floating-minimize-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.floating-body {
    height: 160px;
    background: #1E293B;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.floating-video-placeholder {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.15);
}

.floating-user-info {
    position: absolute;
    bottom: 12px;
    left: 15px;
    color: white;
}

.floating-user-info h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.floating-user-info p {
    font-size: 0.8rem;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.floating-timer {
    position: absolute;
    bottom: 12px;
    right: 15px;
    color: #10B981;
    font-weight: bold;
    font-family: monospace;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-controls {
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
}

.floating-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.floating-control-btn.end {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.floating-control-btn.end:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Input Area */
.input-area {
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 80px;
}

.message-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(248, 250, 252, 0.8);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: var(--transition-fast);
    border: 2px solid rgba(139, 92, 246, 0.1);
}

.message-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.message-input::placeholder {
    color: rgba(139, 92, 246, 0.4);
    font-weight: 500;
}

.send-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(139, 92, 246, 0.35);
}

/* Interests Filter Overlay */
.filter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 50;
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.filter-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.close-btn {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.2);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.close-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 28px;
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.interest-card {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(139, 92, 246, 0.1);
    border-radius: var(--border-radius);
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.interest-card.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(139, 92, 246, 0.2);
}

.interest-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition-fast);
}

.interest-card.active .interest-text {
    color: white;
}

/* Bottom Sheet Menu */
.menu-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
}

.sheet-panel {
    width: 100%;
    background: #fff;
    padding: 20px 24px 32px;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.15);
}

.drag-line {
    width: 40px;
    height: 5px;
    background: #ccc;
    border-radius: 10px;
    margin: 0 auto 20px;
}

.sheet-btn {
    border: none;
    background: #f1f1f1;
    width: 100%;
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sheet-btn.exit {
    background: var(--danger);
    color: white;
    margin-top: 10px;
}

.sheet-btn:hover {
    transform: translateY(-2px);
}

/* Toast Notifications */
#toastContainer {
    position: fixed;
    bottom: 30px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.toast {
    padding: 14px 20px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 14px;
    animation: toastIn 0.4s ease, toastOut 0.4s ease 3.8s forwards;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    max-width: 300px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

/* Scrollbar */
.chat-area::-webkit-scrollbar {
    width: 6px;
}

.chat-area::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.05);
    border-radius: 10px;
}

.chat-area::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 480px) {
    .app-container {
        height: 100vh;
        max-height: none;
        border-radius: 0;
        max-width: 100%;
    }

    .page-content {
        padding: 24px 20px;
    }

    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .selection-card {
        max-width: 90px;
        padding: 16px 8px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-item {
        max-width: 100%;
    }

    .chat-header {
        padding: 16px 20px;
    }

    .input-area {
        padding: 16px;
    }

    .floating-control-container {
        bottom: 90px;
        right: 16px;
    }

    .floating-control-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .interests-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block;
}
/* Floating Controls - Bottom Center */
.floating-control-container {
    position: fixed;
    bottom: 50px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 20px;
    z-index: 1000;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.floating-control-btn {
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999999;
    position: relative;
}

.floating-control-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.floating-control-btn:active {
    transform: translateY(-2px) scale(1.05);
}

.floating-control-btn.end {
    background: var(--danger);
    color: white;
    border-color: transparent;
    width: 70px;
    height: 70px;
    font-size: 24px;
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.25);
}

.floating-control-btn.end:hover {
    background: #dc2626;
    box-shadow: 0 18px 40px rgba(239, 68, 68, 0.35);
}

.floating-control-btn.confirm {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    animation: pulse 1.5s infinite;
    width: 70px;
    height: 70px;
}

.floating-control-btn[style*="display: none"] {
    display: none !important;
}

/* Different colors for different buttons */
.floating-control-btn:first-child { /* Mute button */
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border-color: transparent;
}

.floating-control-btn:last-child { /* Skip button */
    background: linear-gradient(135deg, var(--warning), #D97706);
    color: white;
    border-color: transparent;
}

/* When muted, change mute button color */
.floating-control-btn.muted {
    background: linear-gradient(135deg, var(--danger), #DC2626);
}

@keyframes pulse {
    0% { transform: translateY(0) scale(1); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.25); }
    50% { transform: translateY(-5px) scale(1.1); box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4); }
    100% { transform: translateY(0) scale(1); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.25); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-control-container {
        bottom: 25px;
        gap: 15px;
    }
    
    .floating-control-btn {
        width: 55px;
        height: 55px;
        font-size: 20px;
    }
    
    .floating-control-btn.end,
    .floating-control-btn.confirm {
        width: 65px;
        height: 65px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .floating-control-container {
        bottom: 20px;
        gap: 12px;
        padding: 0 15px;
    }
    
    .floating-control-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .floating-control-btn.end,
    .floating-control-btn.confirm {
        width: 58px;
        height: 58px;
        font-size: 20px;
    }
}

/* Ensure buttons are visible on top of other elements */
.floating-control-container * {
    z-index: 10001;
}

/* Glass morphism effect for buttons */
.floating-control-btn {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.floating-control-btn.end {
    backdrop-filter: blur(10px);
    background: rgba(239, 68, 68, 0.95);
}

.floating-control-btn:first-child {
    backdrop-filter: blur(10px);
    background: rgba(16, 185, 129, 0.95);
}

.floating-control-btn:last-child {
    backdrop-filter: blur(10px);
    background: rgba(245, 158, 11, 0.95);
}

.floating-control-btn.confirm {
    backdrop-filter: blur(10px);
    background: rgba(139, 92, 246, 0.95);
}

/* BEGIN: Styles copied from public/new.html to style the call UI exactly like new.html */
:root {
    --peach: #FFD8C9;
    --peach-light: #FFF5F1;
    --peach-dark: #FFBAA5;
    --purple: #7C3AED;
    --purple-light: #8B5CF6;
    --purple-dark: #5B21B6;
    --purple-transparent: rgba(124, 58, 237, 0.1);
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --white: #FFFFFF;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --radius: 20px;
    --radius-sm: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header and container for call UI (match new.html) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 70px;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Setup page card */
.setup-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: 30px 20px;
    margin-top: 70px;
    max-width: 450px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.setup-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 25px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.setup-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--peach-dark), var(--purple));
}

.setup-title { font-size: 1.8rem; margin-bottom: 8px; color: var(--text-dark); font-weight:700; text-align:center }
.setup-subtitle { text-align:center; color:var(--text-light); margin-bottom:25px }

.input-field { width:100%; padding:14px 16px; background:var(--peach-light); border-radius:var(--radius-sm); }

.gender-card { background: var(--peach-light); border-radius: var(--radius-sm); padding: 18px 8px; text-align:center }
.gender-card.selected { background: var(--white); border-color: var(--purple); box-shadow: 0 8px 16px rgba(124,58,237,0.12); }

.btn-primary { background: linear-gradient(to right, var(--purple), var(--purple-light)); color: white; border-radius: 14px; padding: 14px 18px; font-weight:700 }

/* Ensure call page displays like new.html */
.call-page { display: none; height: 100vh; background: #0F172A }
.call-page.active { display:flex; flex-direction:column }

/* Floating window styles (match new.html) */
.floating-call-window { position: fixed; top: 90px; right: 30px; width: 320px; background: rgba(15,23,42,0.95); backdrop-filter: blur(15px); border-radius:16px; box-shadow: 0 25px 50px rgba(0,0,0,0.3); z-index:999; display:none; overflow:hidden; border:1px solid rgba(255,255,255,0.15); transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275); transform-origin: top right }
.floating-call-window.active { display:block; animation: floatIn 0.4s ease-out }
.floating-call-window.minimized { width:200px; height:50px; border-radius:10px; cursor:pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.2) }

/* Full call view tweaks */
.full-call-view { flex:1; display:flex; flex-direction:column; padding-top:70px }
.call-header { padding:15px 25px; display:flex; justify-content:space-between; align-items:center; background: rgba(15,23,42,0.8) }
.call-avatar { width:50px; height:50px; border-radius:50%; background: linear-gradient(135deg,var(--purple),var(--purple-light)); display:flex; align-items:center; justify-content:center; font-size:1.5rem; font-weight:bold; color:white }
.video-container { flex:1; background:#0F172A; position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center }
.video-placeholder { text-align:center; padding:25px; max-width:500px }

/* END: Styles copied from public/new.html */