body {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 0px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
#receive-code-display {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
    text-align: left;
}
#receive-button,
#send-button,
#join-button,
#generate-button {
    height: 40px; /* Match channel-code height */
    box-sizing: border-box;
    padding: 0 15px;
    border: 2px solid #ddd;
    background: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    color: black
}
#receive-button:hover,
#send-button:not(:disabled):hover {
    background: #e0e0e0;
}
#download-button {
    display: none;
    height: 36px;
    padding: 0 12px;
    background: transparent;
    border: 2px solid #999;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

#download-button:hover {
    background: #f5f5f5;
    border-color: #777;
    color: #333;
}

#download-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #ccc;
    color: #999;
}

/* Spinner for download button */
#download-button.loading::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #666;
    border-radius: 50%;
    animation: spin-simple 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
#text-timestamp {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}
#channel-code {
    display: inline-block;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 4px;
    color: #333;
    padding: 4px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    min-width: 180px;
    width: 180px;
    height: 40px;
    text-align: center;
    line-height: 32px;
    outline: none;
    box-sizing: border-box;
}

#channel-code:focus {
    border-color: #4CAF50;
    background: #fff;
}

#channel-code::placeholder {
    color: #ccc;
    letter-spacing: 4px;
}
textarea, input[type="text"] {
    max-width: 100%;
    box-sizing: border-box;
}
textarea {
    width: 100%;
}
.image-list-container {
    margin-top: 10px;
}
.image-summary {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}
.image-item {
    display: flex;
    align-items: center;
    padding: 5px;
    border-bottom: 1px solid #eee;
}
.remove-btn {
    background: #999;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    margin-right: 10px;
}
.remove-btn:hover {
    background: #666;
}
.image-thumbnail {
    width: 30px;
    height: 30px;
    object-fit: cover;
    margin-right: 10px;
}
.received-image-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-right: 10px;
    cursor: pointer;
}
.image-filename {
    flex: 1;
    font-size: 14px;
}
.image-size {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
    min-width: 65px;
    display: inline-block;
    text-align: right;
}
.download-item-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}
.download-item-btn:hover {
    background: #45a049;
}

#received-files-list {
    margin-top: 10px;
}
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.file-card {
    cursor: pointer;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: transform 0.2s;
}
.file-card:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.file-card-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}
.file-card-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 8px;
}
.file-card-name {
    font-size: 12px;
    word-break: break-word;
    margin-bottom: 4px;
}
.file-card-size {
    font-size: 11px;
    color: #999;
}
/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}
.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;     /* IE 10+ */
    user-select: none;         /* Standard */
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.modal-close:hover {
    color: #ccc;
}
/* Spinner styles */
.spinner {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 8px;
}
.spinner::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #666;
    border-radius: 50%;
    animation: spin-simple 0.8s linear infinite;
}
@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes spin-simple {
    to { transform: rotate(360deg); }
}
/* Progress bar styles */
.progress-bar {
    font-family: monospace;
    color: #666;
    font-size: 12px;
    margin: 0 5px;
}
.progress-percent {
    font-size: 12px;
    color: #666;
    margin: 0 5px;
}
.status-text {
    font-size: 12px;
    color: #666;
    margin: 0 5px;
}

/* Retry button */
.retry-btn {
    background: #ff9800;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    margin-right: 10px;
}
.retry-btn:hover {
    background: #f57c00;
}
.remove-btn:disabled,
.retry-btn:disabled {
    background: #ccc;
    opacity: 0.6;
    cursor: not-allowed;
}
/* Send button disabled state */
#send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}
#text-input {
    font-family: inherit;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 8px;
}
/* Loading Overlay styles */
.loading-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,1);    
    justify-content: center;
    align-items: center;
}
.loading-overlay.active {
    display: flex;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 6px solid #bfbfbf;
    border-top: 6px solid #262626;
    border-radius: 50%;
    animation: spin-simple 1s linear infinite;
}
    
/* Mode transitions */
.section-wrapper {
    transition: opacity 300ms ease, filter 300ms ease;
}

/* Receive mode - dim send section */
.receive-mode #send-section {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.3);
}

/* Send mode - dim receive section */
.send-mode #receive-section {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.3);
}
/* Exclude certain elements from dimming in send mode */
.send-mode #send-section #generated-code-display {
    opacity: 1;
    filter: none;
}
.send-mode #send-section .file-upload-label,
.send-mode #send-section .image-list-container,
.send-mode #send-section #multi-receiver-options,
.send-mode #send-section #multi-receiver-options label,
.send-mode #send-section label[for="file-input"] {
    opacity: 0.6;
}
/* Mode locked state */
.mode-locked {
    pointer-events: none !important;
}
/* Generated code display */
#generated-code-display {
    display: flex;
    align-items: center;
    margin: 10px 0 15px 0;
    text-align: left;
}
#generated-code-display #send-button {
    margin-left: auto;
}

#generated-code {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 4px;
    color: #333;
    padding: 4px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    min-width: 180px;
    width: 180px;
    height: 40px;
    outline: none;
    box-sizing: border-box;
}

#copy-code-btn,
#copy-link-btn {
    background: none;
    border: none;
    font-size: 20px;
    padding: 8px;
    color: #ccc;
    cursor: default;
    pointer-events: none;
}
#copy-code-btn {
    margin-left: 10px;
}

#copy-code-btn.active,
#copy-link-btn.active {
    color: black;
    cursor: pointer;
    pointer-events: auto;
}
#copy-code-btn.active:hover,
#copy-link-btn.active:hover {
    background: #eee;
    border-radius: 6px;
}

#copy-text-icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    padding: 8px;
    flex-shrink: 0;
    color: #ccc;
    cursor: default;
    pointer-events: none;
}
#received-text-display.has-text ~ #copy-text-icon-btn {
    color: black;
    cursor: pointer;
    pointer-events: auto;
}
#received-text-display.has-text ~ #copy-text-icon-btn:hover {
    background: #eee;
    border-radius: 6px;
}

.code-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
}
/* Modal navigation buttons */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 150px;
    background: rgba(0, 0, 0, 0.6);
    color: white; /* The SVG stroke="currentColor" will inherit this */
    border: 0px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    border-radius: 8px;
    z-index: 2001;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    /* font-size and font-weight removed */
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.modal-nav-btn:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0);
}

.modal-nav-btn:active {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-50%) scale(0.95);
}

.modal-prev {
    left: 10px;
}

.modal-next {
    right: 10px;
}

.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .modal-nav-btn {
        width: 50px;
        height: 160px;
        font-size: 32px;
        background: rgba(0, 0, 0, 0.4);
        border: 0px solid rgba(255, 255, 255, 0.4);
    }
    
    .modal-prev {
        left: 5px;
    }
    
    .modal-next {
        right: 5px;
    }
}
/* Received text wrapper */
#received-text-wrapper {
    position: relative;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Received text display */
#received-text-display {
    flex: 1;
    padding: 8px;
    box-sizing: border-box;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
    min-height: 40px;
}
#received-text-display.has-text {
    border-color: #4CAF50;
}


#received-text-display a {
    color: #0066cc;
    text-decoration: underline;
}

#received-text-display a:hover {
    color: #0052a3;
}
.disabled-option {
    opacity: 0.4;
    cursor: not-allowed;
}
/* --- App Header Menu --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-bottom: 10px;
}

.main-header h1 {
    margin: 0; /* Remove default h1 margin */
}

/* --- Header Link Fix --- */
.main-header h1 a {
    color: inherit; /* Makes it use the h1's color */
    text-decoration: none; /* Removes the underline */
}
/* Header Navigation */
.header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-right: 10px;
}

.header-nav a,
.header-nav span {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    opacity: 1;
}

.header-nav a.active,
.header-nav span.active {
    opacity: 0.6;
    cursor: default;
}

/* Header Right Container */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hide header-right on mobile */
@media (max-width: 600px) {
    .header-right {
        gap: 0;
    }
}

/* Hide navigation links on mobile, show only active */
@media (max-width: 600px) {
    .header-nav {
        display: flex; /* Keep flex display */
    }
    
    .header-nav a {
        display: none; /* Hide all links */
    }
    
    .header-nav span.active {
        display: inline; /* Show only active page */
    }
}

.app-menu-container {
    position: relative; /* Anchor for the dropdown menu */
}

.app-menu-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333; /* SVG stroke color */
}

.app-menu-button:hover {
    background: #eee;
}

.app-menu {
    position: absolute;
    top: 100%; /* Position right below the button */
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 200px; /* Set a fixed width */
    z-index: 500;
    display: flex;
    flex-direction: column;
    padding: 8px 0; /* Add padding inside the menu */
}

.app-menu.menu-hidden {
    display: none;
}

/* Style for all items in the menu */
.app-menu a,
.app-menu span {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.app-menu span.active {
    opacity: 0.6;
    cursor: default;
}

/* Style for clickable links */
.app-menu a:hover {
    background-color: #f5f5f5;
}

/* Style for non-clickable text placeholders */
.menu-item-placeholder {
    color: #999;
    cursor: not-allowed;
}

/* ==============================================
   CONVERSATION MODE STYLES
   ============================================== */

/* --- Main Layout --- */

/* This wrapper will hold the chat and file sections side-by-side */
.room-content-wrapper {
    display: flex;
    flex-wrap: wrap; /* Allows sections to stack on small screens */
    gap: 20px;
}

#chat-section {
    flex: 1; /* Take up available space */
    min-width: 300px; /* Don't get too small */
    display: flex;
    flex-direction: column; /* Stack chat elements vertically */
}

#files-section {
    flex: 1; /* Take up available space */
    min-width: 300px; /* Don't get too small */
}

/* --- Connection Area Layout --- */

#connection-controls {
    display: grid;
    /* grid-template-columns: 1fr auto; <-- REMOVED */
    gap: 10px;
    align-items: center; /* Vertically align items in each row */
}

/* This new rule targets the wrapper from your HTML */
#connection-controls #receive-code-display {
    grid-row: 1;
    justify-self: start; /* This is the key: stops the element from stretching */
}


/*
  We REMOVED the old rules for:
  - #connection-controls #channel-code
  - #connection-controls #join-button
  ...because they are no longer direct grid items.
*/

/* 'or' Divider (now inside receive-code-display) */
#connection-controls .button-divider {
    /* grid-column, grid-row, and text-align are removed */
    margin: 0; /* Remove default margins */
    font-size: 1.1em; /* <-- Kept */
    font-weight: 500; /* <-- Kept */
    color: #555; /* <-- Kept */
    /* The parent flex-box now handles alignment */
}

/* We can remove the old hover rule, as it will use the default one */
.button-divider {
    font-size: 0.9em;
    color: #888;
    margin: 0 5px;
}

#connection-status {
    font-size: 0.9em;
    color: #555;
    margin-top: 10px;
}

/* --- Live Chat Area --- */

#chat-messages {
    border: 1px solid #ccc;
    background-color: #fdfdfd;
    height: 400px;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
/* Force scroll to work properly */
#chat-messages::before {
    content: '';
    margin-top: auto;  /* Pushes first message down when there's space */
}
/* Conversation mode - chat input */
#chat-input {
    font-size: 16px;
    min-height: 60px;
    padding: 10px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.4;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

#chat-input:focus {
    outline: none;
    border-color: #3d77ff;
}

.chat-message {
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    max-width: 80%;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Message from other users */
.chat-message.other {
    background-color: #f1f1f1;
    align-self: flex-start;
}

/* Message from the current user */
.chat-message.user {
    background-color: #3d77ff;
    color: white;
    align-self: flex-end;
}

/* System messages like "User joined" */
.chat-message.system {
    background-color: #fffbe6;
    color: #5c3a00;
    align-self: center;
    font-style: italic;
    font-size: 0.9em;
}

.message-sender {
    display: inline;
    font-weight: bold;
    font-size: 0.8em;   
    color: #555;
}

.message-sender::before {
    content: '[';
}

.message-sender::after {
    content: '] '; /* This adds the closing bracket AND a space */
}

.chat-message.user .message-sender {
    color: #eee; /* Lighter sender name for user's own messages */
}


#chat-input-area {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1; /* Take all available width */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
#chat-input::-webkit-scrollbar {
    display: none; /* Webkit browsers */
}
/* --- File Upload & Grid Area --- */

/* Style the file input 'label' to look like a drop zone */
.file-upload-label {
    display: block;
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    background-color: #f9f9f9;
    margin-bottom: 15px;
}

.file-upload-label:hover {
    border-color: #007bff;
    background-color: #f4f8ff;
}
.file-upload-label.drag-active {
    border-color: #007bff;
    background-color: #f4f8ff;
}
/* Hide the actual file input */
#file-input {
    display: none;
}

/* We reuse the .files-grid and .file-card styles 
   from your main CSS for the file list display.
   No new rules needed if they are globally defined.
*/
#file-grid {
    --placeholder: 'intentionally-empty';
    /* Styles for .files-grid, .file-card, etc. are assumed to exist */
}

/* ==================== WebRTC Styles ==================== */

/* WebRTC Code Section */
.webrtc-code-section {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.code-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#webrtc-code-input {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 4px;
    color: #333;
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    width: 200px;
    text-align: center;
    outline: none;
    box-sizing: border-box;
}

#webrtc-code-input[readonly] {
    background: #f9f9f9;
    border-color: #4CAF50;
}

#webrtc-code-input:focus {
    border-color: #4CAF50;
}

#webrtc-code-input::placeholder {
    color: #ccc;
    letter-spacing: 2px;
    font-size: 16px;
}

#webrtc-code-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* WebRTC Buttons */
.webrtc-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.webrtc-btn:hover:not(:disabled) {
    background: #45a049;
}

.webrtc-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.webrtc-btn-small {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.webrtc-btn-small:hover {
    background: #45a049;
}



#generated-code-display p {
    margin: 0;
    font-size: 16px;
}

#generated-code-text {
    font-size: 28px;
    letter-spacing: 4px;
    color: #4CAF50;
    font-weight: bold;
}

/* Connection Status */
.webrtc-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-disconnected {
    background: #ff4444;
}

.status-waiting {
    background: #ff9800;
    animation: pulse 2s infinite;
}

.status-connecting {
    background: #ffeb3b;
    animation: pulse 1s infinite;
}

.status-connected {
    background: #4CAF50;
}

.status-transferring {
    background: #2196F3;
    animation: pulse 1.5s infinite;
}

.status-error {
    background: #ff4444;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#status-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* File List Section */
.webrtc-file-list-section {
    margin: 20px 0;
}

.webrtc-file-list-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.webrtc-file-list {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 15px;
}

.empty-list-message {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 50px 20px;
    margin: 0;
}

/* File Item */
.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #f9f9f9;
}

.file-remove-btn {
    background: #ff4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    margin-right: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-remove-btn:hover {
    background: #cc0000;
}

.file-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    word-break: break-word;
    margin-right: 10px;
}

.file-size {
    font-size: 12px;
    color: #999;
    margin-right: 10px;
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
}

.file-status {
    color: #4CAF50;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
    margin-left: 10px;
}

.file-progress {
    font-size: 12px;
    color: #2196F3;
    font-weight: 500;
    flex-shrink: 0;
    margin-left: 10px;
    min-width: 40px;
    text-align: right;
}

/* Action Buttons */
.webrtc-action-buttons {
    margin-top: 15px;
}

#creator-buttons,
#receiver-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#file-input-webrtc {
    display: none;
}

/* Loading Overlay - already exists but ensure it works with flex */
.loading-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#loading-text {
    color: white;
    font-size: 16px;
    margin-top: 20px;
}

/* Responsive adjustments for WebRTC */
@media (max-width: 600px) {
    .code-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    #webrtc-code-input {
        width: 100%;
    }
    
    .webrtc-btn {
        width: 100%;
    }
    
}/* ==================== Authentication Styles ==================== */

/* Auth tabs */
.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #ddd;
}

.auth-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  transition: all 0.3s ease;
}

.auth-tab:hover {
  color: #333;
  background: #f5f5f5;
}

.auth-tab.active {
  color: #333;
  border-bottom-color: #333;
  font-weight: 600;
}

/* Auth forms */
.auth-form {
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
  outline: none;
  border-color: #333;
}

.form-group small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #666;
}

/* Submit button */
.auth-submit-btn {
  width: 100%;
  padding: 12px;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.auth-submit-btn:hover {
  background: #555;
}

.auth-submit-btn:active {
  background: #222;
}

/* Auth message */
.auth-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  display: none;
}

.auth-message:not(:empty) {
  display: block;
}

/* Account info */
.account-info {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 6px;
  border-left: 4px solid #333;
}

.account-info p {
  margin: 10px 0;
  font-size: 16px;
}

.account-info strong {
  color: #333;
  margin-right: 10px;
}

/* Account actions */
.account-actions {
  max-width: 400px;
  margin: 20px auto;
}

/* Responsive design */
@media (max-width: 600px) {
  .auth-form {
    max-width: 100%;
    padding: 0 10px;
  }
  
  .auth-tab {
    padding: 8px 15px;
    font-size: 14px;
  }
  
  .account-info {
    padding: 15px;
  }
}/* ==================== Toast Notification Styles ==================== */

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  min-width: 250px;
  max-width: 400px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.toast-info {
  background: #2196F3;
}

.toast-success {
  background: #4CAF50;
}

.toast-error {
  background: #f44336;
}

.toast-warning {
  background: #ff9800;
}

/* Mobile responsive */
@media (max-width: 600px) {
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}
/* Delete modal */
.modal-dialog {
  background: white;
  padding: 25px;
  border-radius: 8px;
  max-width: 400px;
  margin: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-dialog h3 {
  margin: 0 0 10px 0;
  font-size: 20px;
}

/* Site Footer */
.site-footer {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 20px 0;
    margin-top: 20px;
}