/* Base Variables */
:root {
    --discord-bg: #36393f;
    --discord-dark: #202225;
    --discord-light: #40444b;
    --discord-text: #dcddde;
    --discord-muted: #72767d;
    --discord-link: #7289da;
    --discord-green: #43b581;
    --discord-red: #f04747;
    --discord-hover: #424549;
    --sidebar-width: 240px;
    --server-width: 72px;
    --logo-primary: #7289da;
    --logo-secondary: #5865f2;
    --logo-accent: #99aab5;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Roboto', sans-serif;
    background-color: var(--discord-bg);
    color: var(--discord-text);
}

a {
    color: var(--discord-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

.app-container.not-logged-in {
    background-color: var(--discord-dark);
    justify-content: center;
    align-items: center;
}

.app-container.not-logged-in .server-sidebar,
.app-container.not-logged-in .channel-sidebar,
.app-container.not-logged-in .chat-interface {
    display: none;
}
.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--discord-dark);
    padding: 2rem;
}

.welcome-content {
    text-align: center;
    max-width: 600px;
    animation: fadeInUp 0.5s ease-out;
}

.welcome-icon {
    font-size: 4rem;
    color: var(--discord-link);
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.welcome-content h2 {
    font-size: 2rem;
    color: var(--discord-text);
    margin-bottom: 1rem;
}

.welcome-content p {
    color: var(--discord-muted);
    margin-bottom: 2rem;
}

.feature-list {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--discord-bg);
    border-radius: 8px;
    min-width: 120px;
    transition: transform 0.2s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--discord-link);
}

.feature-item span {
    color: var(--discord-text);
    font-size: 0.9rem;
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
/* Server Sidebar */
.server-sidebar {
    width: var(--server-width);
    background-color: var(--discord-dark);
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    border-right: 1px solid var(--discord-hover);
    z-index: 1001;
}

.server-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--discord-light);
    border: none;
    color: var(--discord-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: border-radius 0.2s, background-color 0.2s;
    overflow: hidden;  /* Add this */
}
.server-icon .logo-container {
    width: 100%;
    height: 100%;
    margin: 0;  /* Reset margin */
}
.server-icon .logo-main {
    border-radius: inherit;  /* This will follow the parent's border radius */
    background: linear-gradient(135deg, #7289da, #5865f2);
}

.server-icon .logo-letter {
    font-size: 24px;  /* Smaller font size */
    font-weight: 600;
}

.server-icon:hover {
    border-radius: 16px;
}

.server-icon:hover .logo-main {
    border-radius: 16px;
}

.server-icon.active {
    border-radius: 16px;
}

.server-icon.active .logo-main {
    border-radius: 16px;
}

.server-icon.active {
    background-color: var(--discord-link);
    border-radius: 16px;
}

.server-divider {
    height: 2px;
    background-color: var(--discord-light);
    width: 32px;
    margin: 4px 0;
}

/* Channel Sidebar */
.channel-sidebar {
    width: var(--sidebar-width);
    background-color: var(--discord-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid var(--discord-hover);
    z-index: 1000;
}

.search-container {
    padding: 12px;
}

.search-container input {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: none;
    background-color: var(--discord-dark);
    color: var(--discord-text);
}

.dm-section {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    color: var(--discord-muted);
    font-size: 12px;
    font-weight: 700;
}

.add-dm {
    background: none;
    border: none;
    color: var(--discord-muted);
    cursor: pointer;
    font-size: 14px;
}

.dm-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dm-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--discord-muted);
    transition: background-color 0.2s, color 0.2s;
}

.dm-item:hover {
    background-color: var(--discord-hover);
    color: var(--discord-text);
}

.dm-item.active {
    background-color: var(--discord-hover);
    color: var(--discord-text);
}

.dm-item .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
}

.dm-item .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--discord-green);
    margin-left: auto;
}

.dm-item .status-indicator.offline {
    background-color: var(--discord-red);
}

/* Call and End Call buttons */
#call-button,
#end-call-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: var(--discord-dark);
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#call-button {
    color: var(--discord-green);
    border-color: var(--discord-green);
}

#call-button:hover:not(:disabled) {
    background: var(--discord-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 181, 129, 0.3);
}

#call-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--discord-muted);
    color: var(--discord-muted);
}

#end-call-button {
    color: var(--discord-red);
    border-color: var(--discord-red);
}

#end-call-button:hover {
    background: var(--discord-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 71, 71, 0.3);
}

/* Logout Button */
#logout-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--discord-red);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--discord-red);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#logout-button:hover {
    background: var(--discord-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 71, 71, 0.3);
}

#logout-button:active {
    transform: translateY(0);
}

/* Button press effect for all buttons */
#call-button:active:not(:disabled),
#end-call-button:active,
#logout-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--discord-bg);
    position: relative;
    overflow: hidden;
}

/* Chat Interface */
.chat-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Chat Header */
.chat-header {
    padding: 16px;
    background-color: var(--discord-bg);
    border-bottom: 1px solid var(--discord-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
}

.chat-header-info {
    font-size: 18px;
    font-weight: 500;
}

.chat-header-controls {
    display: flex;
    gap: 8px;
}

/* Messages Container */
.messages-container {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

/* Video Container and Related Styles */
.video-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 120px);
    background: var(--discord-dark);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: black;
}

.video-wrapper.active {
    flex: 2;
}

.video-wrapper.enlarged {
    width: 100%;
    height: 100%;
}


.video-wrapper.minimized {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 240px;
    height: 135px; /* 16:9 aspect ratio */
    z-index: 10;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.enlarge-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper:hover .enlarge-btn {
    opacity: 1;
}


.video-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    z-index: 9999;
}

.video-wrapper.fullscreen video {
    border-radius: 0;
}

.video-wrapper.enlarged + .video-wrapper,
.video-wrapper.enlarged ~ .video-wrapper {
    flex: 0.5;
}

.fullscreen-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper:hover .fullscreen-btn {
    opacity: 1;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.video-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: white;
    z-index: 10;
}

/* Call Controls */
.call-controls-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(32, 34, 37, 0.95);
    border-radius: 32px;
    z-index: 1000;
}

.call-control-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--discord-light);
    border: none;
    color: var(--discord-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.call-control-button:hover {
    background-color: var(--discord-hover);
    transform: translateY(-1px);
}

.call-control-button i {
    font-size: 18px;
}

/* Volume Slider */
.call-control-slider {
    width: 100px;
    height: 8px;
    background-color: var(--discord-light);
    border-radius: 2px;
    cursor: pointer;
}

.call-control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background-color: var(--discord-text);
    border-radius: 50%;
    cursor: pointer;
}

.call-control-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background-color: var(--discord-text);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Auth Container */
.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 480px;
    padding: 32px;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    background-color: rgba(32, 34, 37, 0.9);
    backdrop-filter: blur(10px);
}

/* Logo Animations */
.logo-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
}

.logo {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: float 3s ease-in-out infinite;
}

.logo-main {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--logo-primary), var(--logo-secondary));
    border-radius: 24px;
    transform: perspective(500px) rotateY(0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(114, 137, 218, 0.3);
}

.logo-letter {
    color: var(--discord-text);
    font-size: 48px;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .video-container {
        flex-direction: column;
        height: auto;
        padding: 8px;
    }
    
    .video-wrapper {
        width: 100%;
        height: 40vh;
    }
    
    .video-wrapper.enlarged {
        height: 60vh;
    }
    
    .video-wrapper.enlarged + .video-wrapper,
    .video-wrapper.enlarged ~ .video-wrapper {
        height: 20vh;
    }
    
    .video-wrapper.fullscreen {
        height: 100vh;
    }
}
/* Bean Character Container */
.bean-container {
    position: fixed;  /* Changed from absolute to fixed */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}
@media (max-width: 768px) {
    .bean-container,
    .welcome-messages {
        display: none !important;
    }
}
/* Hide bean when logged in */
.app-container:not(.not-logged-in) .bean-container,
.app-container:not(.not-logged-in) .welcome-messages {
    opacity: 0;
    pointer-events: none;
}

/* Bean Body */
.bean-body {
    position: absolute;
    width: 160px;
    height: 200px;
    background: #7289da;
    border-radius: 100px;
    animation: breathe 4s ease-in-out infinite;
}

/* Improved Ushanka Hat */
.bean-ushanka {
    position: absolute;
    top: -20px;
    left: 20px;
    width: 120px;
    height: 60px;
    background: #4a4a4a;
    border-radius: 10px 10px 0 0;
    overflow: visible;
}

/* Star on hat */
.bean-ushanka::before {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffd700;
    font-size: 24px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Redesigned flaps with angles */
.ushanka-flap-left,
.ushanka-flap-right {
    position: absolute;
    width: 50px;
    height: 70px;
    background: #4a4a4a;
    bottom: -40px;
}

.ushanka-flap-left {
    left: -10px;
    transform-origin: top right;
    transform: skew(-15deg);
    border-radius: 0 0 25px 15px;
    animation: flapWaveLeft 3s ease-in-out infinite;
}

.ushanka-flap-right {
    right: -10px;
    transform-origin: top left;
    transform: skew(15deg);
    border-radius: 0 0 15px 25px;
    animation: flapWaveRight 3s ease-in-out infinite;
}

/* Eye */
.bean-eye {
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    top: 70px;
    left: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.eye-pupil {
    width: 30px;
    height: 30px;
    background: #2c2f33;
    border-radius: 50%;
    position: relative;
    animation: lookAround 8s ease-in-out infinite;
}

/* Eyelid */
.eye-lid {
    position: absolute;
    width: 62px;
    height: 62px;
    background: #7289da;
    border-radius: 50%;
    top: -1px;
    left: -1px;
    transform-origin: top;
    animation: blink 4s ease-in-out infinite;
}

.video-container.full-width {
    width: calc(100vw - var(--server-width));
    transition: width 0.3s ease;
}

.channel-sidebar {
    transition: transform 0.3s ease;
}

.channel-sidebar.hidden {
    transform: translateX(-100%);
}

/* Welcome Messages */
.welcome-messages {
    position: fixed;  /* Changed from absolute to fixed */
    left: calc(50% + 150px);
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    padding: 30px;
    border-radius: 20px;
    background: rgba(32, 34, 37, 0.7);
    backdrop-filter: blur(10px);
    z-index: 2;
}

/* Text Bubble Triangle */
.welcome-messages::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-width: 15px 20px 15px 0;
    border-color: transparent rgba(32, 34, 37, 0.7) transparent transparent;
}

/* Glow effect */
.welcome-messages::after {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(
        135deg,
        var(--logo-primary) 0%,
        var(--logo-secondary) 50%,
        var(--logo-primary) 100%
    );
    border-radius: 25px;
    opacity: 0.1;
    filter: blur(20px);
    z-index: -1;
    animation: auraPulse 4s ease-in-out infinite;
}

/* Media Query Adjustments */
@media (max-width: 1400px) {
    .welcome-messages {
        left: calc(50% + 120px);
        width: 400px;
    }
    .welcome-message {
        font-size: 32px;
    }
}

@media (max-width: 1200px) {
    .welcome-messages {
        left: calc(50% + 100px);
        width: 350px;
    }
    .welcome-message {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .bean-container,
    .welcome-messages {
        display: none !important;
    }
}

.welcome-message {
    font-size: 38px;
    color: var(--discord-text);
    transition: opacity 0.5s ease-in-out;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
}
.welcome-message::after {
    content: 'Connect & Chat & Share';
    display: block;
    font-size: 16px;
    color: var(--discord-muted);
    margin-top: 10px;
    letter-spacing: 2px;
    opacity: 0.7;
    font-weight: normal;
}

.welcome-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    font-size: 24px;
    color: var(--discord-muted);
    opacity: 0.15;
    animation: floatIcon 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) { top: 10%; right: 20%; animation-delay: 0s; }
.floating-icon:nth-child(2) { top: 40%; right: 10%; animation-delay: 1s; }
.floating-icon:nth-child(3) { top: 70%; right: 25%; animation-delay: 2s; }
.floating-icon:nth-child(4) { top: 20%; right: 40%; animation-delay: 3s; }
.floating-icon:nth-child(5) { top: 50%; right: 30%; animation-delay: 1.5s; }
.floating-icon:nth-child(6) { top: 30%; right: 15%; animation-delay: 2.5s; }


/* Additional Animations */
@keyframes auraPulse {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1);
    }
    50% {
        opacity: 0.15;
        transform: scale(1.05);
    }
}

@keyframes floatIcon {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-10px, -10px) rotate(5deg);
    }
}

/* Updated Animations */
@keyframes flapWaveLeft {
    0%, 100% { transform: skew(-15deg) rotate(0deg); }
    50% { transform: skew(-15deg) rotate(15deg); }
}

@keyframes flapWaveRight {
    0%, 100% { transform: skew(15deg) rotate(0deg); }
    50% { transform: skew(15deg) rotate(-15deg); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes blink {
    0%, 95%, 100% { transform: scaleY(0); }
    97.5% { transform: scaleY(1); }
}

@keyframes lookAround {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(8px, -8px); }
    50% { transform: translate(-8px, 5px); }
    75% { transform: translate(5px, 8px); }
}

@keyframes messageFloat {
    0%, 100% { 
        opacity: 0;
        transform: translateX(20px);
    }
    20%, 80% {
        opacity: 1;
        transform: translateX(0);
    }
}
/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--discord-dark);
}

::-webkit-scrollbar-thumb {
    background-color: var(--discord-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--discord-muted);
}

/* Focus States */
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--discord-link);
    outline-offset: 2px;
}

/* Error States */
.error {
    border-color: var(--discord-red) !important;
}

.error-message {
    color: var(--discord-red);
    font-size: 12px;
    margin-top: 4px;
}

/* Notifications */
#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    z-index: 10000;
}

.notification {
    background-color: var(--discord-light);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    color: var(--discord-text);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background-color: black;
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

[data-tooltip]:hover:before {
    opacity: 1;
}

/* Call Buttons */
.btn-accept, .btn-reject {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-accept {
    background-color: var(--discord-green);
    color: white;
}
.btn-reject {
    background-color: var(--discord-red);
    color: white;
}

/* Incoming Call Modal */
.incoming-call {
    position: fixed;
    inset: 0;
    background-color: rgba(32, 34, 37, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.incoming-call.visible {
    opacity: 1;
    pointer-events: all;
}

.incoming-call-box {
    background-color: var(--discord-dark);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}


/* Loading States */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: '\f110';
    animation: spin 1s linear infinite;
}

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

/* Hangup Animation */
.hangup-animation {
    position: absolute;
    inset: 0;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    pointer-events: none;
    z-index: 1001;
}

.hangup-animation::after {
    content: '';
    width: 0;
    height: 0;
    background: rgba(114, 118, 125, 0.5);
    position: absolute;
    border-radius: 50%;
    animation: ripple 0.6s ease-out forwards;
}

/* Print styles */
@media print {
    .app-container {
        background: white;
    }
    
    .server-sidebar,
    .channel-sidebar,
    .call-controls-panel,
    .fullscreen-btn {
        display: none !important;
    }
    
    .content-area {
        color: black;
    }
}

/* Chrome-specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .video-container {
        display: flex !important;
        flex-direction: row !important;
    }

    .video-wrapper {
        transform: translate3d(0,0,0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
}

/* High DPI Screen Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .video-wrapper {
        transform: translate3d(0,0,0);
    }
}

/* Performance Optimizations */
.video-wrapper {
    will-change: transform;
    transform: translateZ(0);
}

.video-wrapper video {
    will-change: transform;
}

/* User Profile */
.user-profile {
    padding: 12px;
    background-color: var(--discord-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--discord-hover);
}

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

.user-controls {
    display: flex;
    gap: 8px;
}

/* Form Input Styles */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    background: var(--discord-light);
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--discord-text);
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--discord-link);
    outline: none;
}

/* Button Styles */
.btn-primary {
    width: 100%;
    padding: 10px;
    background: var(--discord-link);
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: var(--logo-secondary);
}

.call-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}
.friend-requests-section {
    padding: 8px;
    position: relative;
}

.friend-request-count {
    background-color: var(--discord-red);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    position: absolute;
    right: 8px;
    top: 8px;
}

.friend-requests-dropdown {
    background-color: var(--discord-dark);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.friend-requests-tabs {
    display: flex;
    border-bottom: 1px solid var(--discord-light);
}

.tab-button {
    flex: 1;
    padding: 8px;
    background: none;
    border: none;
    color: var(--discord-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button.active {
    color: var(--discord-text);
    background-color: var(--discord-light);
}

.tab-content {
    display: none;
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

.friend-request-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    background-color: var(--discord-light);
}

.friend-request-item .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.friend-request-item .username {
    flex: 1;
    color: var(--discord-text);
}

.friend-request-actions {
    display: flex;
    gap: 4px;
}

.friend-request-actions button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.accept-button {
    background-color: var(--discord-green);
    color: white;
}

.reject-button {
    background-color: var(--discord-red);
    color: white;
}

.add-friend-section {
    padding: 8px;
    display: flex;
    gap: 8px;
}

#add-friend-input {
    flex: 1;
    padding: 8px;
    background-color: var(--discord-dark);
    border: none;
    border-radius: 4px;
    color: var(--discord-text);
}

#add-friend-button {
    padding: 8px;
    background-color: var(--discord-link);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

#add-friend-button:hover {
    background-color: var(--logo-secondary);
}
/* Add this at the end of your style.css file */

/* Mirror the local video on both desktop and mobile */
.video-wrapper.local video {
    transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    -moz-transform: scaleX(-1);
  }
  
  /* Mobile-specific styles - these only apply when screen width <= 767px */
  @media (max-width: 767px) {
    /* ===== MOBILE LAYOUT ADJUSTMENTS ===== */
    
    /* Video calling layout adjustments for mobile */
    .video-container {
      /* Adjust height for mobile */
      height: calc(100vh - 120px);
    }
    
    /* Picture-in-picture layout for mobile calls */
    .video-wrapper.remote {
      width: 100%;
      height: 100%;
    }
    
    .video-wrapper.local {
      position: absolute;
      bottom: 80px;
      right: 10px;
      width: 100px;
      height: 150px;
      z-index: 10;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
    
    /* Call controls adjustments */
    .call-controls-panel {
      padding: 8px 15px;
      gap: 8px;
    }
    
    .call-control-button {
      width: 36px;
      height: 36px;
    }
    
    .call-control-slider {
      width: 80px;
    }
    
    /* Auth container adjustments */
    .auth-container {
      padding: 16px;
    }
    
    .auth-box {
      width: 100%;
      max-width: 320px;
      padding: 24px;
    }
    
    .logo-container {
      width: 80px;
      height: 80px;
      margin-bottom: 15px;
    }
    
    /* Welcome screen adjustments */
    .welcome-content {
      max-width: 100%;
      padding: 0 1rem;
    }
    
    .welcome-icon {
      font-size: 3rem;
    }
    
    .welcome-content h2 {
      font-size: 1.5rem;
    }
    
    .feature-list {
      gap: 1rem;
    }
    
    .feature-item {
      min-width: 80px;
      padding: 0.75rem;
    }
    
    /* Notification adjustments */
    #notification-container {
      width: 250px;
    }
    
    /* Incoming call adjustments */
    .incoming-call-box {
      width: 90%;
      max-width: 320px;
      padding: 20px;
    }
  }
  
  /* Adjustments for different orientations on mobile */
  @media (max-width: 767px) and (orientation: portrait) {
    /* Portrait mode */
    .video-wrapper.local {
      width: 90px;
      height: 120px;
    }
  }
  
  @media (max-width: 767px) and (orientation: landscape) {
    /* Landscape mode */
    .video-container {
      height: calc(100vh - 100px);
    }
    
    .video-wrapper.local {
      width: 120px;
      height: 90px;
      bottom: 70px;
    }
  }
  
  /* Small phone adjustments */
  @media (max-width: 380px) {
    .call-controls-panel {
      padding: 5px 10px;
    }
    
    .call-control-button {
      width: 32px;
      height: 32px;
    }
    
    .feature-item {
      min-width: 70px;
      padding: 0.5rem;
    }
  }
  
  /* iPhone notch/safe area handling */
  @supports (padding-top: env(safe-area-inset-top)) {
    @media (max-width: 767px) {
      .call-controls-panel {
        bottom: calc(20px + env(safe-area-inset-bottom));
      }
    }
  }
