:root {
    --primary: #00a884;
    --primary-hover: #06cf9c;
    --bg-dark: #0b141a;
    --sidebar-bg: rgba(17, 27, 33, 0.7);
    --glass-bg: rgba(32, 44, 51, 0.6);
    --text-main: #e9edef;
    --text-dim: #8696a0;
    --border: rgba(255, 255, 255, 0.08);
}

.text-primary {
    color: var(--primary);
}

.text-dim {
    color: var(--text-dim);
}

#my-avatar {
    cursor: pointer;
    transition: all 0.3s ease;
}

#my-avatar:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.md-hidden {
    display: none;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .md-hidden {
        display: block;
    }
}

@keyframes pulse-highlight {
    0% {
        border-color: rgba(0, 168, 132, 0.4);
        box-shadow: 0 0 0 0 rgba(0, 168, 132, 0.2);
    }

    50% {
        border-color: rgba(0, 168, 132, 1);
        box-shadow: 0 0 15px 5px rgba(0, 168, 132, 0.3);
    }

    100% {
        border-color: rgba(255, 255, 255, 0.05);
        box-shadow: 0 0 0 0 rgba(0, 168, 132, 0);
    }
}

.pulse-highlight {
    animation: pulse-highlight 2s ease-out;
}

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.bg-dark {
    background-color: var(--bg-dark);
}

.text-main {
    color: var(--text-main);
}

.font-outfit {
    font-family: 'Outfit', sans-serif;
}

.hidden {
    display: none !important;
}

.app-wrapper {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: 2rem;
}

@media (max-width: 768px) {
    .app-wrapper {
        padding: 0;
    }
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sidebar {
    width: 320px;
    min-width: 320px;
    flex-shrink: 0;
}

.chat-area {
    flex: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .sidebar {
        width: 30%;
        min-width: 250px;
    }
}

@media (max-width: 700px) {
    .sidebar {
        width: 100%;
        min-width: 100%;
    }

    #main-shell.chat-active .sidebar {
        display: none;
    }

    #main-shell:not(.chat-active) .chat-area {
        display: none;
    }
}

.loader-sm {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-low);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Auth Styles */
.auth-card {
    background: rgba(32, 44, 51, 0.95);
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 24px;
}

.input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    color: white;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-field:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 168, 132, 0.15);
}

.primary-btn {
    width: 100%;
    background: var(--primary);
    color: #111b21;
    font-weight: 600;
    padding: 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 168, 132, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Message Bubbles */
.message-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 16px;
    position: relative;
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.msg-me {
    align-self: flex-end;
    background: #005c4b;
    color: #e9edef;
    border-bottom-right-radius: 4px;
}

.msg-them {
    align-self: flex-start;
    background: #202c33;
    color: #e9edef;
    border-bottom-left-radius: 4px;
}

/* Facial Verify Mirror */
.camera-view {
    transform: scaleX(-1);
    border-radius: 100%;
    border: 4px solid var(--primary);
    box-shadow: 0 0 30px rgba(0, 168, 132, 0.3);
}

/* Common Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-1 {
    flex: 1;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-lg {
    max-width: 32rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.text-6xl {
    font-size: 3.75rem;
}

.font-light {
    font-weight: 300;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.025em;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.border {
    border: 1px solid var(--border);
}

.border-b {
    border-bottom: 1px solid var(--border);
}

.border-r {
    border-right: 1px solid var(--border);
}

.border-white-5 {
    border-color: rgba(255, 255, 255, 0.05);
}

.border-white-10 {
    border-color: rgba(255, 255, 255, 0.1);
}

.bg-white-5 {
    background-color: rgba(255, 255, 255, 0.05);
}

.bg-black-20 {
    background-color: rgba(0, 0, 0, 0.2);
}

.bg-black-40 {
    background-color: rgba(0, 0, 0, 0.4);
}

.cursor-pointer {
    cursor: pointer;
}

.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

.z-1000 {
    z-index: 1000;
}

.backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Spacing utilities like space-y-4 */
.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

.space-y-8>*+* {
    margin-top: 2rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-4 {
    margin-right: 1rem;
}

/* Call Overlay Styles */
#call-card.show {
    scale: 1;
    opacity: 1;
}

#call-overlay {
    transition: opacity 0.3s ease;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.shadow-primary\/20 {
    box-shadow: 0 10px 15px -3px rgba(0, 168, 132, 0.2), 0 4px 6px -4px rgba(0, 168, 132, 0.2);
}

.shadow-red-500\/20 {
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2), 0 4px 6px -4px rgba(239, 68, 68, 0.2);
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

#local-video {
    transform: scaleX(-1);
}

.object-cover {
    object-fit: cover;
}

.scale-95 {
    transform: scale(0.95);
}

.opacity-0 {
    opacity: 0;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}