/* Modern FaceTime-style UI */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #000;
    overflow: hidden;
    color: #fff;
    user-select: none;
    -webkit-user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main container */
.video-call-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Remote video (full screen) */
#remotevideoelement {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    aspect-ratio: 4/3;
    margin: auto;
}

#videoremote1 {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Local video (PiP) - Base styles */
.local-video-container {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    cursor: move;
    z-index: 200;
}

/* Portrait aspect ratio (3:4) */
.local-video-container.portrait {
    width: 120px;
    height: 160px;
}

/* Landscape aspect ratio (4:3) */
.local-video-container.landscape {
    width: 160px;
    height: 120px;
}

/* Wide aspect ratio (16:9) */
.local-video-container.wide {
    width: 160px;
    height: 90px;
}

/* Local visit sizing - match member kiosk */
.local-video-container.local-video-sizing.portrait {
    width: 180px;
    height: 240px;
}

.local-video-container.local-video-sizing.landscape {
    width: 240px;
    height: 180px;
}

.local-video-container.local-video-sizing.wide {
    width: 240px;
    height: 135px;
}

/* Large screens (24" and up) - double the size */
@media (min-width: 1440px) {
    .local-video-container.portrait {
        width: 192px;
        height: 256px;
    }
    .local-video-container.landscape {
        width: 256px;
        height: 192px;
    }
    .local-video-container.wide {
        width: 256px;
        height: 144px;
    }
}

#myvideo, #canvasOutputVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale;
    transition: transform 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: scaleX(1) translate(-50%, -50%);
    transform-origin: center center;
}
/* Add rotation classes for different orientations */
.rotate-90 {
    transform: scaleX(1) rotate(90deg);
}

.rotate-270 {
    transform: scaleX(1) rotate(270deg);
}

#videolocal {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Subtle hairline so the self-view box stays visible even when masking
       renders the whole feed near-solid black (the box-shadow handles contrast
       over everything else). Semi-transparent white reads as a faint edge over
       black and all but disappears over lighter content.
       border-box keeps the 100% sizing inside the parent's rounded clip. */
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    box-sizing: border-box;
}

/* Top bar */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px 20px 20px 40px;
    padding-top: 20px;
    background: transparent;
    z-index: 50;
    transition: opacity 0.3s ease;
}

.top-bar.permanent {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.top-bar-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

/* Local visit sizing (between phone and tablet) */
.top-bar.local-top-bar {
    padding: 24px 24px 24px 48px;
    padding-top: 24px;
}

.top-bar.local-top-bar .call-info {
    gap: 6px;
}

.top-bar.local-top-bar .caller-name {
    font-size: 22px;
    letter-spacing: -0.25px;
}

.top-bar.local-top-bar .timer {
    font-size: 17px;
}

.call-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.caller-name {
    font-size: 18px;
    font-weight: 600;
}

.call-status {
    font-size: 14px;
    opacity: 0.8;
}

.timer {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-weight: 600;
    margin-left: 10px;
    color: white;
    transition: color 0.3s ease;
}

.timer.urgent {
    color: #ff3b30;
}

/* Bottom controls */
.controls-container {
    position: absolute !important;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 30px 30px 70px 30px;
    padding-bottom: 70px;
    background: transparent;
    z-index: 500 !important;  /* Increase z-index */
    transition: opacity 0.3s ease;  /* Only transition opacity, not all */
    pointer-events: none !important;  /* CRITICAL: Container doesn't block clicks */
}

/* Additional bottom padding for remote visits - portrait mode only */
@media (orientation: portrait) {
    .controls-container.remote-controls {
        padding-bottom: 65px !important;
    }
    
    /* Position message above end button for remote visits in portrait */
    /* 65px (padding) + 90px (end button height) = 155px */
    .message_wrapper.remote-message {
        bottom: 155px !important;
    }
}

/* Position message above end button for remote visits in landscape */
/* Just the end button height (90px) since no extra padding was added */
@media (orientation: landscape) {
    .message_wrapper.remote-message {
        bottom: 90px !important;
    }
}

/* Position message above end button for remote visits on desktop */
/* End button height (90px) + more spacing = 120px */
/* More specific to override landscape on desktop screens */
@media (min-width: 1024px) {
    .message_wrapper.remote-message {
        bottom: 170px !important;
    }
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    pointer-events: none !important;  /* Controls wrapper also doesn't block clicks */
}

/* Control buttons */
.control-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    font-size: 32px;
    position: relative;
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.end-call {
    background: #ff3b30;
    width: 90px;
    height: 90px;
    pointer-events: auto !important;  /* CRITICAL: Button is always clickable */
    z-index: 600 !important;  /* Ensure it's on top of everything */
    position: relative !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(255, 59, 48, 0.3) !important;
    touch-action: manipulation !important;  /* Optimize for touch */
}

 /* Waiting screen */
.waiting-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.waiting-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.waiting-avatar {
    width: 120px;
    height: 120px;
    background: #306CBF;
    border-radius: 50%;
    margin: 0 auto 30px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 600;
    animation: pulse 2s ease infinite;
    position: relative;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.waiting-text {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 300;
}

.waiting-subtext {
    font-size: 16px;
    opacity: 0.6;
    margin-bottom: 30px;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: bounce 1.4s ease infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-10px); opacity: 1; }
}

/* Status messages */
.status-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 40px 60px;
    border-radius: 16px;
    text-align: center;
    z-index: 800;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.status-message h2 {
    font-size: 32px;
    margin: 0 0 15px 0;
    font-weight: 600;
    color: white;
}

.status-message p {
    font-size: 18px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Notice wrapper container - Original styling for remote visits */
.notice-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: calc(50% - 40px);
    padding-bottom: 20px;
    padding-left: 20px;
    z-index: 100;
    display: flex;
    align-items: flex-start;
}

/* Local visit specific styling */
.notice-wrapper.local-notice-spacing {
    right: calc(50% - 60px);
    padding-bottom: 30px;
    padding-left: 30px;
    bottom: 30px;
}

/* Notices - Original smaller styling for remote visits */
.notice-bar {
    background: rgba(0, 0, 0, 0.8);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease;
    color: #fff;
    letter-spacing: 0.3px;
}

/* Larger styling for local visits */
.notice-wrapper.local-notice-spacing .notice-bar {
    padding: 12px 24px;
    border-radius: 16px;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.notice-bar.recording {
    background: rgba(255, 59, 48, 0.9);
}

.notice-bar p {
    margin: 0;
    padding: 0;
}

.notice-bar .mobile-break {
    display: inline;
}

/* Privileged notice */
.notice-bar.privileged {
    background: rgba(0, 122, 255, 0.9);
}

.notice-icon {
    font-size: 16px;
}

@keyframes slideDown {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
    .local-video-container {
        top: 15px;
        right: 15px;
    }

    .controls-container {
        padding: 20px;
    }

    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .control-btn.end-call {
        width: 60px;
        height: 60px;
    }

    .top-bar {
        padding: 15px;
    }

    .top-bar-content {
        flex-wrap: wrap;
        gap: 15px;
    }

    .caller-name {
        font-size: 16px;
    }

    .timer {
        font-size: 14px;
    }

    .notice-bar .mobile-break {
        display: block;
    }

    .exit-interface {
        margin-top: 6px;
    }

    .exitbtn {
        font-size: 13px;
        padding: 10px 20px;
    }
}

/* Mobile orientation-aware sizing (phones under 768px) */
@media (max-width: 768px) and (orientation: portrait) {
    .local-video-container:not(.local-video-sizing) {
        width: 90px;
        height: 120px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .local-video-container:not(.local-video-sizing) {
        width: 120px;
        height: 90px;
    }
}

/* Very small landscape screens (e.g., phone in landscape) */
@media (orientation: landscape) and (max-height: 500px) {
    .controls-container {
        padding: 15px;
    }

    .top-bar {
        padding: 10px;
    }

    .local-video-container:not(.local-video-sizing) {
        width: 100px;
        height: 75px;
    }

    .control-btn.end-call {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* Remote visit responsive sizing - tablets and larger (over 768px) */
@media (min-width: 769px) and (orientation: portrait) {
    .local-video-container:not(.local-video-sizing) {
        width: 120px;
        height: 160px;
    }
}

@media (min-width: 769px) and (orientation: landscape) {
    .local-video-container:not(.local-video-sizing) {
        width: 160px;
        height: 120px;
    }
}

/* Local visit responsive sizing - match member kiosk */
@media (orientation: portrait) {
    .local-video-container.local-video-sizing {
        width: 180px;
        height: 240px;
    }
}

@media (orientation: landscape) {
    .local-video-container.local-video-sizing {
        width: 240px;
        height: 180px;
    }
}

/* Landscape orientation - message wrapper override */
@media (orientation: landscape) and (max-width: 1024px) {
    .message_wrapper {
        bottom: 70px !important;
    }
}

/* iPad and larger tablets in any orientation */
@media (min-width: 768px) {
    .message_wrapper {
        bottom: 130px !important; /* Perfect spacing for iPad screens */
    }
}


/* Hidden elements */
.hidden {
    display: none !important;
}

/* Fade transitions */
.fade-out {
    opacity: 0;
    /* REMOVED: pointer-events: none; */
}

/* Ensure button stays interactive even when container is faded */
.controls-container.fade-out .control-btn.end-call {
    pointer-events: auto !important;
    opacity: 0.3 !important;  /* Slightly visible even when faded */
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Message container styles */
.message_wrapper {
    position: absolute;
    bottom: 90px;
    left: 0;
    right: 0;
   text-align: center;
    z-index: 700;
}

.message_container {
   display: inline-block;
    max-width: 80%;
    margin: 0 auto;
}


.message_content {
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    text-align: center;
    font-size: 1.2em;
    font-weight: 500;
    padding: 15px 25px;
    border-radius: 8px;
    white-space: pre-line;
    line-height: 1.4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.loading-message {
    position: absolute;
    bottom: 33.33%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    text-align: center;
    z-index: 150;
}

/* Initial Loading Screen */
.initial-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    text-align: center;
}

.loading-title {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 300;
    color: #fff;
    text-align: center;
}

.loading-subtitle {
    font-size: 16px;
    opacity: 0.6;
    margin-bottom: 30px;
    color: #fff;
    text-align: center;
}

.loading-icon {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pulse-animation {
    animation: pulse 2s infinite ease-in-out;
}

/* Legal Representative Modal Styles */
.legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    /* iOS touch fix */
    -webkit-overflow-scrolling: touch;
}

.legal-modal-content {
    background-color: #1c1c1e;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Remove overflow properties that can interfere with iOS touch */
}

.legal-modal-header {
    padding: 24px 24px 0;
    text-align: center;
}

.legal-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.legal-modal-body {
    padding: 24px;
    text-align: center;
}

.warning-icon {
    margin-bottom: 20px;
}

.legal-text {
    font-size: 18px;
    color: white;
    margin-bottom: 16px;
    line-height: 1.4;
}

.legal-subtext {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 0;
}

.legal-modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.legal-btn {
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    /* iOS touch fixes */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* Ensure button is clickable */
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    position: relative;
    margin: 0;
}

/* Add margin spacing as fallback for Electron webviews that don't support gap */
/* Use margin-right on all buttons except last, or margin-left on all except first */
.legal-modal-footer .legal-btn:not(:last-child) {
    margin-right: 20px;
}

/* More specific selector for better Electron webview compatibility */
.legal-modal-footer #consentDeclineBtn {
    margin-right: 20px !important;
}

.legal-modal-footer #consentAcceptBtn {
    margin-left: 0 !important;
}

.legal-btn-primary {
    background-color: #007aff;
    color: white;
}

.legal-btn-primary:hover {
    background-color: #0051d5;
}

.legal-btn-primary:active {
    background-color: #0040a8;
    transform: scale(0.98);
}

.legal-btn-secondary {
    background-color: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
    border: 1px solid #ff3b30;
}

.legal-btn-secondary:hover {
    background-color: #ff3b30;
    color: white;
}

.legal-btn-secondary:active {
    background-color: #e62e24;
    transform: scale(0.98);
}

/* Touch feedback for buttons */
.legal-btn.touching {
    transform: scale(0.95);
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .legal-modal-overlay {
        padding: 15px;
    }
    
    .legal-modal-content {
        width: 100%;
    }
    
    .legal-modal-header {
        padding: 20px 20px 0;
    }
    
    .legal-modal-body {
        padding: 20px;
    }
    
    .legal-modal-footer {
        padding: 0 20px 20px;
        flex-direction: column-reverse;
        gap: 15px;
    }
    
    .legal-modal-footer .legal-btn:not(:last-child) {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .legal-modal-footer .legal-btn + .legal-btn {
        margin-left: 0;
        margin-top: 15px;
    }
    
    .legal-btn {
        width: 100%;
        min-width: auto;
        padding: 16px 24px;
    }
}

@media (max-width: 320px) {
    .legal-modal-overlay {
        padding: 10px;
    }
    
    .legal-modal-header h2 {
        font-size: 20px;
    }
    
    .legal-text {
        font-size: 16px;
    }
    
    .legal-subtext {
        font-size: 14px;
    }
}

/* End Visit Confirmation Modal Styles */
.end-visit-modal-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Add margin spacing as fallback for Electron webviews that don't support gap */
.end-visit-modal-footer button:not(:last-child) {
    margin-right: 20px;
}

/* More specific selector for better Electron webview compatibility */
.end-visit-modal-footer #endVisitCancelBtn {
    margin-right: 20px !important;
}

.end-visit-modal-footer #endVisitConfirmBtn {
    margin-left: 0 !important;
}

/* Local visit end modal - match member tablet size */
.end-visit-modal.local-end-visit-modal {
    width: 500px !important;
    padding: 40px 50px !important;
    border-radius: 20px !important;
}

.end-visit-modal.local-end-visit-modal .end-visit-title {
    font-size: 32px !important;
    margin-bottom: 20px !important;
}

.end-visit-modal.local-end-visit-modal .end-visit-text {
    font-size: 20px !important;
    margin-bottom: 35px !important;
}

.end-visit-modal.local-end-visit-modal .end-visit-btn {
    padding: 15px 30px !important;
    border-radius: 10px !important;
    font-size: 18px !important;
    min-width: 120px !important;
}

/* Remote visit end modal - larger for desktop */
@media (min-width: 1024px) {
    .end-visit-modal:not(.local-end-visit-modal) {
        width: 500px !important;
        padding: 40px 50px !important;
        border-radius: 20px !important;
    }
    
    .end-visit-modal:not(.local-end-visit-modal) .end-visit-title {
        font-size: 32px !important;
        margin-bottom: 20px !important;
    }
    
    .end-visit-modal:not(.local-end-visit-modal) .end-visit-text {
        font-size: 20px !important;
        margin-bottom: 35px !important;
    }
    
    .end-visit-modal:not(.local-end-visit-modal) .end-visit-btn {
        padding: 15px 30px !important;
        border-radius: 10px !important;
        font-size: 18px !important;
        min-width: 120px !important;
    }
}

/* Local visit message styles - match member tablet */
.message_wrapper.local-message {
    bottom: 230px !important;
}

.message_wrapper.local-message .message_content {
    font-size: 24px !important;
    padding: 20px 35px !important;
    border-radius: 16px !important;
}

/* Landscape orientation override for local messages */
@media (orientation: landscape) {
    .message_wrapper.local-message {
        bottom: 170px !important;
    }
}

/* Volume Control Styles */
.volume-control-wrapper {
    position: fixed;
    bottom: 60px; /* Reduced from 120px to 60px */
    right: 30px;
    z-index: 1000;
    background: transparent;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    border: none;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.volume-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    padding: 0;
}

.volume-button:active {
    transform: scale(0.96);
}

.volume-icon {
    color: white;
    opacity: 0.9;
    flex-shrink: 0;
}

.volume-slider {
    flex: 1;
    height: 12px;
    margin: 0 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-track {
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #007AFF; /* Blue thumb to match the filled track */
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-track {
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    border: none;
}

.volume-slider::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #007AFF; /* Blue thumb */
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Create blue fill effect using a gradient background */
.volume-slider {
    background: linear-gradient(to right, #007AFF 0%, #007AFF var(--fill-percent, 100%), rgba(255, 255, 255, 0.3) var(--fill-percent, 100%), rgba(255, 255, 255, 0.3) 100%);
}

.volume-slider::-ms-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.volume-slider:focus {
    outline: none;
}

/* Exit interface */
.exit-interface {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.exitbtn {
    background-color: #55acee;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.exitbtn:hover {
    background-color: #4a9cd8;
}

.exitbtn:active {
    transform: translateY(1px);
}

.exit-note {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .volume-control-wrapper {
        bottom: 100px;
        right: 20px;
        padding: 12px 15px;
    }
    
    .volume-control {
        min-width: 200px;
        gap: 10px;
    }
    
    .volume-slider {
        height: 10px;
    }
    
    .volume-slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
    
    .volume-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }
    
    .volume-slider::-ms-thumb {
        width: 20px;
        height: 20px;
    }

    .exit-interface {
        margin-top: 6px;
    }

    .exitbtn {
        font-size: 13px;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .volume-control-wrapper {
        bottom: 90px;
        right: 15px;
        padding: 10px 12px;
    }
    
    .volume-control {
        min-width: 160px;
        gap: 8px;
    }

    .volume-button {
        width: 38px;
        height: 38px;
    }
    
    .volume-icon {
        width: 18px;
        height: 18px;
    }
}