:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.88);
    --accent-primary: #10b981;
    --accent-primary-hover: #059669;
    --accent-danger: #ef4444;
    --accent-danger-hover: #dc2626;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.12);
    --focus-glow: #38bdf8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow: hidden;
}

.nav-item:focus, .nav-item:focus-visible {
    outline: 3px solid var(--focus-glow) !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.8) !important;
    transform: scale(1.03);
}

.app-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0f172a 100%);
}

.top-bar {
    width: 100%;
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.lang-select {
    background: rgba(30, 41, 59, 0.9);
    color: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.lang-select:focus, .lang-select:hover {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: white;
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
    border-radius: 50%;
    cursor: pointer;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge.online {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

.view {
    width: 100%;
    height: calc(100vh - 60px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

.main-layout {
    width: 95%;
    max-width: 1100px;
    height: 90%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(16px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.profile-tag {
    font-size: 0.8rem;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.avatar-wrapper {
    position: relative;
    font-size: 2.2rem;
}

.presence-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}

.presence-dot.green {
    background-color: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.presence-dot.gray {
    background-color: #64748b;
}

.btn-contact-call {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* TV NEWS TICKER BANNER (నల్లటి బ్యాక్‌గ్రౌండ్ పై తెల్లటి అక్షరాల వార్తల పట్టీ) */
.live-caption-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: rgba(0, 0, 0, 0.95);
    border-top: 4px solid #38bdf8;
    padding: 1rem 2.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 160;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.9);
    animation: slideUp 0.4s ease-out;
}

.ticker-tag {
    background: #38bdf8;
    color: #0f172a;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    margin-right: 1.2rem;
    white-space: nowrap;
    text-transform: uppercase;
}

.ticker-text-wrap {
    flex: 1;
    text-align: left;
}

#live-caption-text {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* MOBILE IN-CALL VOICE-TO-TEXT NOTEPAD DRAWER */
.mobile-incall-caption-bar {
    position: absolute;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 520px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.8rem;
    z-index: 160;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    backdrop-filter: blur(12px);
}

.notepad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #38bdf8;
    font-weight: 600;
}

.btn-dictate {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 0.35rem 0.7rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-dictate.active {
    background: #ef4444;
    animation: pulse-ring 1s infinite;
}

.preset-chips {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.chip-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.caption-input-row {
    display: flex;
    gap: 0.5rem;
}

.caption-input-row textarea {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1rem;
    outline: none;
    resize: none;
}

.btn-send-caption {
    background: #10b981;
    color: white;
    border: none;
    padding: 0 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
}

.btn {
    width: 100%;
    padding: 1.1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-primary { background-color: #3b82f6; color: white; }
.btn-secondary { background-color: #475569; color: white; margin-top: 1rem; }
.btn-call { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; }

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.incoming-card { border: 2px solid #10b981; }

.request-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }

.fullscreen-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: black;
    z-index: 100;
}

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

.pip-container {
    position: absolute;
    bottom: 9rem;
    right: 2rem;
    width: 160px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: #000;
    z-index: 150;
}

.local-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

.video-overlay-controls {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.85);
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    z-index: 140;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
}

.btn-danger { background: var(--accent-danger); border-radius: 9999px; font-weight: 700; width: auto; padding: 0 1.2rem; }

/* Splash Screen Styling */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 35%, #1e293b 0%, #080c14 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.splash-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: splashPop 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-logo {
    width: 150px;
    height: auto;
    max-height: 150px;
    filter: drop-shadow(0 0 30px rgba(56, 189, 248, 0.6));
    animation: pulseLogo 2s infinite ease-in-out;
}

.splash-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 1.2rem;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.splash-subtitle {
    font-size: 1.05rem;
    color: #94a3b8;
    margin-top: 0.3rem;
    font-weight: 500;
}

.splash-loader {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #38bdf8;
    border-radius: 50%;
    margin-top: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 25px rgba(56, 189, 248, 0.5)); }
    50% { transform: scale(1.06); filter: drop-shadow(0 0 45px rgba(56, 189, 248, 0.9)); }
}

@keyframes splashPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo-img {
    height: 34px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

