/* style.css - Modern Video Call Interface with Green & Gold Theme and HudHud Logo */
:root {
  --primary: #2e8b57;          /* Sea Green - Primary */
  --primary-dark: #276749;     /* Darker Green */
  --primary-light: #48bb78;    /* Light Green */
  --secondary: #daa520;        /* Goldenrod - Secondary */
  --secondary-dark: #b8860b;   /* Dark Goldenrod */
  --secondary-light: #f6ad55;  /* Light Gold */
  --success: #38a169;          /* Success Green */
  --danger: #e53e3e;           /* Danger Red */
  --warning: #dd6b20;          /* Warning Orange */
  --info: #3182ce;             /* Info Blue */
  --light: #f7fafc;            /* Light background */
  --dark: #2d3748;             /* Dark text */
  --gray: #718096;             /* Gray */
  --gray-light: #cbd5e0;       /* Light gray */
  --border-radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --gradient-primary: linear-gradient(135deg, #2e8b57 0%, #48bb78 100%);
  --gradient-secondary: linear-gradient(135deg, #daa520 0%, #f6ad55 100%);
  --gradient-bg: linear-gradient(135deg, #2e8b57 0%, #1a365d 100%);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--gradient-bg);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* NAVBAR STYLES */
.navbar {
  background: white;
  border-bottom: 3px solid var(--secondary);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
}

.nav-container {
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-section {
  flex: 1;
}

.nav-section h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--light);
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  color: var(--dark);
  text-align: left;
  width: 100%;
}

.nav-btn:hover {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.nav-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.nav-btn.primary {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
}

.nav-btn.primary:hover {
  background: var(--primary-dark);
}

.nav-btn.secondary {
  background: var(--gradient-secondary);
  color: var(--dark);
  border-color: var(--secondary);
}

.nav-btn.secondary:hover {
  background: var(--secondary-dark);
  color: white;
}

.nav-badge {
  background: var(--danger);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
  margin-left: auto;
}

.nav-btn.active .nav-badge {
  background: rgba(255, 255, 255, 0.3);
}

/* Chat Header */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  margin-bottom: 0;
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chat-header-info h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-header-actions {
  display: flex;
  gap: 0.5rem;
}

/* Settings Panel */
.settings-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setting-group {
  background: var(--light);
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-light);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-light);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.setting-name {
  font-weight: 600;
  color: var(--dark);
}

.setting-desc {
  font-size: 0.8rem;
  color: var(--gray);
}

/* Responsive Navbar */
@media (max-width: 1024px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-buttons {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .nav-btn {
    min-width: 120px;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .nav-buttons {
    flex-direction: column;
  }
  
  .nav-btn {
    min-width: auto;
  }
  
  .chat-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .chat-header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ... (rest of your existing CSS remains exactly the same) ... */

/* Overlay & Login */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 400px;
  border-top: 4px solid var(--secondary);
}

.card h2 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-weight: 600;
}

.card input {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

.card .row {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.card button {
  flex: 1;
}

.muted {
  color: var(--gray);
  font-size: 0.9rem;
}

.note {
  font-size: 0.8rem;
  margin-top: 1rem;
  text-align: center;
}

/* Header */
header {
  background: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--secondary);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--secondary);
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-sub {
  font-size: 0.9rem;
  color: var(--secondary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--light);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-light);
}

.user-box img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--secondary);
}

/* Main Layout */
main {
  display: flex;
  flex: 1;
  gap: 1rem;
  padding: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.left-col, .right-col {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.center-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Panels */
.panel {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.panel h3 {
  margin-bottom: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.panel h3 i {
  color: var(--secondary);
}

/* Video Section */
.video-row {
  display: flex;
  gap: 1rem;
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-light);
}

.video-box {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-header {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.video-container {
  position: relative;
  background: var(--dark);
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 2px solid var(--gray-light);
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--dark);
}

.video-label {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(46, 139, 87, 0.9);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 500;
}

.video-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
}

/* Remote Videos Grid */
.remotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.participant-video {
  background: var(--dark);
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.participant-video.connected {
  border-color: var(--success);
}

.participant-video.pinned {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.3);
  grid-column: 1 / -1;
}

/* Controls */
.controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-light);
}

/* Buttons */
.btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-weight: 500;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn.primary {
  background: var(--gradient-primary);
}

.btn.danger {
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.btn.danger:hover {
  background: #c53030;
}

.btn.warning {
  background: var(--gradient-secondary);
}

.btn.warning:hover {
  background: var(--secondary-dark);
}

.btn.success {
  background: var(--gradient-primary);
}

.btn:disabled {
  background: var(--gray-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.in-call {
  background: var(--gradient-primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Chat Panel */
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-light);
}

.chat-window {
  flex: 1;
  background: var(--light);
  border-radius: var(--border-radius);
  padding: 1rem;
  overflow-y: auto;
  max-height: 300px;
  margin-bottom: 1rem;
  border: 1px solid var(--gray-light);
}

.chat-controls {
  display: flex;
  gap: 0.5rem;
}

.chat-controls input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  transition: border-color 0.3s ease;
}

.chat-controls input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

/* Chat Messages */
.chat-message {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: var(--border-radius);
  background: white;
  border-left: 3px solid var(--gray-light);
  transition: all 0.3s ease;
}

.chat-message:hover {
  border-left-color: var(--primary);
}

.chat-message.own-message {
  background: #f0fff4;
  border-left-color: var(--primary);
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  align-items: center;
}

.message-sender {
  font-weight: bold;
  color: var(--primary);
}

.message-time {
  font-size: 0.8rem;
  color: var(--gray);
}

.message-attachment {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.message-attachment a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.message-attachment a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

/* Stories */
.stories-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.story {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  background: white;
  transition: all 0.3s ease;
}

.story:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.story img, .story video {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--border-radius);
  border: 2px solid var(--secondary);
}

/* Online Users */
.online-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  background: var(--light);
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--gray-light);
  transition: all 0.3s ease;
}

.online-user:hover {
  border-left-color: var(--primary);
}

.online-user.current-user {
  background: #f0fff4;
  border-left: 3px solid var(--secondary);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: bold;
  color: var(--dark);
}

.user-status {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--gray);
}

.user-status .fas.fa-circle {
  color: var(--success);
  font-size: 0.6rem;
}

.no-users {
  text-align: center;
  color: var(--gray);
  font-style: italic;
  padding: 2rem;
  background: var(--light);
  border-radius: var(--border-radius);
  border: 1px dashed var(--gray-light);
}

/* Profile */
.profile {
  text-align: center;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--light);
  border-radius: var(--border-radius);
}

.profile img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 4px solid var(--secondary);
  box-shadow: var(--shadow);
}

.profile-name {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

/* Recordings */
.recordings-list {
  max-height: 300px;
  overflow-y: auto;
}

.recording-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
  background: white;
  transition: all 0.3s ease;
}

.recording-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.recording-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.recording-info .fas {
  color: var(--primary);
  font-size: 1.2rem;
}

.recording-details {
  display: flex;
  flex-direction: column;
}

.recording-name {
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--dark);
}

.recording-date {
  font-size: 0.8rem;
  color: var(--gray);
}

.recording-actions {
  display: flex;
  gap: 0.5rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.hidden {
  display: none;
}

.story-viewer {
  background: white;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--secondary);
}

.story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 2px solid var(--secondary);
  background: var(--light);
}

.story-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.story-user-info img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.story-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
}

.story-content img, .story-content video {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.story-actions {
  padding: 1rem;
  border-top: 1px solid var(--gray-light);
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--light);
}

.story-stats {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 500;
}

.story-comments {
  max-height: 200px;
  overflow-y: auto;
  border-top: 1px solid var(--gray-light);
}

.comment-input {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 2px solid var(--secondary);
  background: var(--light);
}

.comment-input input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  transition: border-color 0.3s ease;
}

.comment-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--dark);
  color: white;
  margin-top: auto;
  border-top: 3px solid var(--secondary);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Recording Indicator */
.recording {
  position: relative;
}

.recording::before {
  content: '● REC';
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--danger);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  font-size: 0.7rem;
  font-weight: bold;
  animation: pulse 1.5s infinite;
  z-index: 10;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Golden Accents */
.panel h3 i, .video-header i, .btn i {
  color: var(--secondary);
}

/* Responsive */
@media (max-width: 1024px) {
  main {
    flex-direction: column;
  }
  
  .left-col, .right-col {
    width: 100%;
  }
  
  .video-row {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
  }
  
  .btn {
    justify-content: center;
    width: 100%;
  }
  
  header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .chat-controls {
    flex-direction: column;
  }
  
  .user-box {
    justify-content: center;
  }
  
  .logo {
    justify-content: center;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light);
  border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Input file styling */
input[type="file"] {
  padding: 0.5rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  background: var(--light);
  font-size: 0.9rem;
}

input[type="file"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

/* Checkbox styling */
input[type="checkbox"] {
  margin-right: 0.5rem;
  transform: scale(1.2);
  accent-color: var(--primary);
}

/* Label styling */
label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Focus states for accessibility */
button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Loading states */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error states */
.error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Success states */
.success {
  color: var(--success);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Warning states */
.warning {
  color: var(--warning);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Logo fallback styling */
.logo-image:before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 50%;
}

/* NEW STYLES FOR ADDED FEATURES */

/* Profile Picture Styles */
.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Screen Sharing Styles */
.btn.active {
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.5);
}

.screenshare-indicator {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--warning);
  color: var(--dark);
  padding: 4px 8px;
  border-radius: var(--border-radius);
  font-size: 0.7rem;
  font-weight: bold;
  z-index: 10;
}

/* File Sharing Styles */
.chat-image {
  max-width: 300px;
  max-height: 300px;
  border-radius: var(--border-radius);
  border: 2px solid var(--secondary);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.chat-image:hover {
  transform: scale(1.05);
}

.chat-video {
  max-width: 400px;
  max-height: 300px;
  border-radius: var(--border-radius);
  border: 2px solid var(--secondary);
}

.chat-audio {
  width: 100%;
  max-width: 400px;
  margin: 10px 0;
}

.chat-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: all 0.3s ease;
}

.chat-file:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Story Media Styles */
.story-media {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--border-radius);
  border: 2px solid var(--secondary);
}

.story-audio {
  width: 100%;
  margin: 10px 0;
}

.story-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.story-file:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid var(--primary);
}

.notification.recording-notification {
  border-left-color: var(--danger);
}

.notification.screenshare-notification {
  border-left-color: var(--warning);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Admin Badge Styles */
.admin-badge {
  background: linear-gradient(135deg, #3182ce 0%, #63b3ed 100%);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7em;
  margin-left: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.admin-avatar {
  position: relative;
}

.admin-shield {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #3182ce;
  border-radius: 50%;
  padding: 2px;
  font-size: 0.6em;
  color: white;
  border: 2px solid white;
}

/* Recording Consent Styles */
.recording-consent {
  background: var(--danger);
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.7em;
  margin-left: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Camera Switch Button */
.btnSwitchCamera:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Screen Share Button Active State */
.btnScreenShare.active {
  background: var(--gradient-secondary);
  color: var(--dark);
}

/* Enhanced Online Users with Profile Pictures */
.online-user .user-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.online-user .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* File Input Enhancements */
.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Story Item Enhancements */
.story-item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
}

.story-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

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

.user-details {
  display: flex;
  flex-direction: column;
}

.story-time {
  font-size: 0.8em;
  color: #718096;
}

.story-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.story-stats {
  display: flex;
  gap: 15px;
  font-size: 0.9em;
  color: #718096;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.story-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.comment {
  font-size: 0.9em;
  margin-bottom: 8px;
  padding: 8px;
  background: #f7fafc;
  border-radius: 6px;
}

.public-badge {
  background: #38a169;
  color: white;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.8em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.private-badge {
  background: #718096;
  color: white;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.8em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.no-stories {
  text-align: center;
  padding: 40px 20px;
  color: #718096;
  font-style: italic;
}

/* Recording Admin Info */
.recording-admin {
  font-size: 0.8em;
  color: #718096;
  margin-top: 4px;
}

/* Enhanced Chat Controls */
.chat-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-controls input[type="text"] {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.chat-controls input[type="file"] {
  padding: 8px;
}

/* Video Container Enhancements */
.video-container.screen-sharing {
  border-color: var(--warning);
}

.video-container.screen-sharing::before {
  content: 'Screen Sharing';
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--warning);
  color: var(--dark);
  padding: 4px 8px;
  border-radius: var(--border-radius);
  font-size: 0.7rem;
  font-weight: bold;
  z-index: 10;
}

/* Camera Preview Enhancements */
.local-video-preview {
  position: relative;
  border: 3px solid var(--primary);
}

.local-video-preview::after {
  content: 'You';
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(46, 139, 87, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 500;
}

/* File Type Icons */
.file-type-icon {
  font-size: 1.2em;
  margin-right: 8px;
}

.pdf-file { color: #e53e3e; }
.word-file { color: #2b579a; }
.excel-file { color: #217346; }
.zip-file { color: #805ad5; }
.audio-file { color: #3182ce; }
.video-file { color: #dd6b20; }
.image-file { color: #38a169; }

/* Responsive Video Grid */
@media (max-width: 1200px) {
  .remotes {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .remotes {
    grid-template-columns: 1fr;
  }
  
  .video-container.pinned {
    grid-column: 1;
  }
}

/* Hover Effects */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.panel {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Focus States Enhancement */
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary: #004d00;
    --secondary: #664d00;
    --border: #000000;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* Print Styles */
@media print {
  .controls,
  .chat-controls,
  .video-actions {
    display: none !important;
  }
  
  .video-container {
    border: 1px solid #000 !important;
  }
}