/* -------------------------------------------------------------
 * NEXUSCALL - PREMIUM STYLING SYSTEM
 * Designed with a Sleek, Glassmorphism Dark Mode & Fluid Micro-Animations
 * ------------------------------------------------------------- */

/* Reset & Root Variables */
:root {
    --bg-dark: #090b11;
    --card-bg: rgba(17, 22, 34, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Premium Color Palette */
    --primary: #6366f1;       /* Indigo Glow */
    --primary-hover: #4f46e5;
    --secondary: #06b6d4;     /* Cyber Cyan */
    --secondary-hover: #0891b2;
    --success: #10b981;       /* Neon Green */
    --success-hover: #059669;
    --danger: #f43f5e;        /* Rose Red */
    --danger-hover: #e11d48;
    --warning: #f59e0b;       /* Amber Warning */
    
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Background Animated Canvas */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Main Container */
#app-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* -------------------------------------------------------------
 * CORE UI COMPONENTS
 * ------------------------------------------------------------- */

/* Glassmorphism Card System */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(99, 102, 241, 0.7);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.5);
}

.btn-success:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(16, 185, 129, 0.7);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(244, 63, 94, 0.5);
}

.btn-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(244, 63, 94, 0.7);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
    width: 100%;
}

label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.3s ease;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px 14px 44px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

input[type="text"]:focus + i,
input[type="email"]:focus + i {
    color: var(--primary);
}

/* -------------------------------------------------------------
 * APP VIEWS & NAVIGATION
 * ------------------------------------------------------------- */
.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.98);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.view.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    z-index: 10;
}

/* -------------------------------------------------------------
 * 1. LOGIN SCREEN STYLES
 * ------------------------------------------------------------- */
#login-screen {
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 60%),
                radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.15), transparent 60%),
                var(--bg-dark);
}

.login-card {
    width: 100%;
    max-width: 460px;
    text-align: center;
    border-radius: 24px;
}

.logo-area {
    margin-bottom: 25px;
}

.logo-icon {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    font-size: 2.2rem;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
    animation: pulseGlow 3s infinite ease-in-out;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    text-align: left;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.tab-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 20px;
    text-align: center;
}

.client-id-config {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.3;
}

.help-text code {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 4px;
    border-radius: 4px;
    color: var(--secondary);
}

#btn-save-client-id {
    margin-top: 10px;
    width: 100%;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    margin: 20px 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.divider span {
    padding: 0 10px;
}

.google-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.error-msg {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 10px;
    text-align: center;
}

/* -------------------------------------------------------------
 * 2. DASHBOARD VIEW STYLES
 * ------------------------------------------------------------- */
#dashboard-screen {
    background: radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.08), transparent 60%),
                var(--bg-dark);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--card-border);
    background: rgba(10, 12, 17, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10;
}

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

.brand i {
    font-size: 1.8rem;
    color: var(--primary);
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.5));
}

.brand h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, white, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 6px 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-pic {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.profile-pic.large {
    width: 90px;
    height: 90px;
    border-width: 3px;
    margin-bottom: 14px;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.user-email {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(244, 63, 94, 0.1);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.05);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    padding: 40px;
    overflow-y: auto;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}

.dashboard-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.main-panel-card,
.status-panel-card {
    height: 100%;
}

.panel-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Share address block */
.address-share-card {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.address-share-card .label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.address-copy-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.my-email-val {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    word-break: break-all;
}

.btn-copy {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.15rem;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

/* Media preview box */
.media-preview-box {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

#local-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* mirror self view */
}

.preview-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
}

.badge {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--secondary);
    border: 1px solid rgba(6, 182, 212, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.call-actions-row {
    display: flex;
    gap: 15px;
}

.call-btn {
    flex: 1;
    font-size: 1.05rem;
    padding: 14px;
}

/* Status Widget */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 25px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.green { background-color: var(--success); }
.status-dot.red { background-color: var(--danger); }
.status-dot.orange { background-color: var(--warning); }

.pulse {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: statusPulse 2s infinite;
}

.status-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: white;
}

/* Info block */
.info-block {
    margin-bottom: 25px;
}

.info-block h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: white;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-block h4 i {
    color: var(--secondary);
}

.info-block p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-list {
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-list li {
    margin-bottom: 6px;
}

/* -------------------------------------------------------------
 * 3. VIDEO CALL SCREEN STYLES
 * ------------------------------------------------------------- */
#call-screen {
    background-color: #000;
}

.video-container {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #050505;
}

/* Local Floating PIP Video */
.local-video-pip {
    position: absolute;
    bottom: 100px;
    right: 30px;
    width: 240px;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: #000;
    z-index: 100;
    transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: grab;
}

.local-video-pip:active {
    cursor: grabbing;
}

.local-video-pip:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

#local-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* mirror self view */
}

.pip-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 10;
}

/* Remote Video Disabled Overlay */
.remote-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0b0e14;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 5;
}

.large-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-secondary);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

.remote-avatar-overlay.active {
    display: flex;
}

#remote-status-indicator {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Call Top Bar */
.call-top-bar {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
    pointer-events: none;
}

.peer-identity {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: statusPulse 2s infinite;
}

#call-peer-name {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    color: white;
}

.timer {
    font-family: monospace;
    font-size: 0.88rem;
    color: var(--secondary);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 12px;
    letter-spacing: 0.05em;
}

/* Call Control Panel Bar */
.call-controls-wrapper {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.call-controls-bar {
    background: rgba(15, 22, 36, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 100px;
    display: flex;
    gap: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.ctrl-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: scale(1.08);
}

.ctrl-btn.active {
    background: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.ctrl-btn.disabled {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.ctrl-btn.disabled:hover {
    background: rgba(244, 63, 94, 0.25);
}

.btn-hangup {
    background: var(--danger);
    color: white;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}

.btn-hangup:hover {
    background: var(--danger-hover);
    transform: scale(1.1) rotate(135deg);
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.7);
}

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--secondary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f1624;
}

.chat-badge.active {
    display: flex;
    animation: bounce 0.4s ease infinite alternate;
}

/* Chat Sidebar Overlay */
.chat-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    height: 100%;
    background: rgba(15, 22, 36, 0.85);
    backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 150;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -15px 0 35px rgba(0, 0, 0, 0.5);
}

.chat-sidebar.active {
    transform: translateX(0);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-header h3 i {
    color: var(--secondary);
}

.close-chat-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.close-chat-btn:hover {
    color: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.4;
    word-break: break-word;
}

.message.outgoing {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), #5046e6);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.message.incoming {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-input-area {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 10px;
}

#chat-input-field {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    outline: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#chat-input-field:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary);
}

.btn-send-message {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--secondary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-send-message:hover {
    background: var(--secondary-hover);
    transform: scale(1.04);
}

/* -------------------------------------------------------------
 * INCOMING CALL MODAL STYLES
 * ------------------------------------------------------------- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.incoming-call-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: 40px 30px;
    border-radius: 28px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.active .incoming-call-card {
    transform: scale(1);
}

.incoming-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px auto;
    animation: ringShake 0.5s infinite alternate;
}

.caller-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.caller-profile h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.caller-profile span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
}

/* -------------------------------------------------------------
 * NOTIFICATION TOAST STYLES
 * ------------------------------------------------------------- */
.notification-toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-toast.active {
    transform: translateY(0);
    opacity: 1;
}

.notification-toast.info #toast-icon { color: var(--secondary); }
.notification-toast.error #toast-icon { color: var(--danger); }
.notification-toast.success #toast-icon { color: var(--success); }

/* -------------------------------------------------------------
 * KEYFRAMES & ANIMATIONS
 * ------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 10px 30px 2px rgba(99, 102, 241, 0.7); }
}

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes ringShake {
    0% { transform: rotate(-10deg) scale(1); }
    100% { transform: rotate(10deg) scale(1.1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

/* Responsiveness adjustments */
@media(max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .dashboard-header {
        padding: 15px 20px;
    }
}

@media(max-width: 600px) {
    .local-video-pip {
        width: 140px;
        bottom: 110px;
        right: 15px;
    }
    
    .call-controls-bar {
        padding: 10px 16px;
        gap: 10px;
    }
    
    .ctrl-btn {
        width: 44px;
        height: 44px;
    }
    
    .chat-sidebar {
        width: 100%;
    }
}
