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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

/* Toast Container and Animations */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 90vw;
}

@keyframes toast-slide-in {
  0% {
    transform: translateX(400px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-slide-out {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  min-width: 300px;
  max-width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  animation: toast-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.toast.removing {
  animation: toast-slide-out 0.4s cubic-bezier(0.36, 0, 0.66, -0.56);
}

.toast-success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.toast-error {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.toast-info {
  background: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

.toast-warning {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

.toast-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  word-break: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.3rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .toast-container {
    right: 10px;
    left: 10px;
    width: calc(100% - 20px);
  }

  .toast {
    min-width: auto;
    width: 100%;
  }
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  min-height: calc(100vh - 40px);
}

/* Header */
header {
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: white;
  padding: 20px 30px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.header-left h1 {
  font-size: 2rem;
  margin-bottom: 5px;
  font-weight: 600;
}

.header-left p {
  opacity: 0.9;
  font-size: 1rem;
  margin: 0;
}

.comparison-link {
  display: inline-block;
  margin-top: 8px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.9;
  transition: opacity 0.3s ease;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.6);
}

.comparison-link:hover {
  opacity: 1;
  border-bottom: 1px solid white;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Screen Management */
.screen {
  display: none;
  padding: 30px;
  min-height: 400px;
}

.screen.active {
  display: block;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  min-height: 56px;
}

.btn.primary {
  background: #4285f4;
  color: white;
}

.btn.primary:hover {
  background: #3367d6;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(66, 133, 244, 0.3);
}

.btn.secondary {
  background: #f8f9fa;
  color: #5f6368;
  border: 1px solid #dadce0;
}

.btn.secondary:hover {
  background: #e8f0fe;
  border-color: #4285f4;
  color: #4285f4;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon {
  font-size: 1.2rem;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

/* Features Section */
.features {
  display: grid;
  gap: 20px;
}

.feature {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.feature-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.feature h3 {
  margin-bottom: 8px;
  color: #202124;
  font-size: 1.1rem;
}

.feature p {
  color: #5f6368;
  line-height: 1.4;
}

/* Form Styles */
.form-container {
  max-width: 400px;
  margin: 0 auto;
}

.form-container h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #202124;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #3c4043;
}

.input-group input {
  width: 100%;
  padding: 16px;
  border: 2px solid #dadce0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  text-align: center;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 2px;
}

.input-group input:focus {
  outline: none;
  border-color: #4285f4;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Room Header */
.room-header {
  text-align: center;
  margin-bottom: 30px;
}

.room-header h2 {
  margin-bottom: 15px;
  color: #202124;
}

.connection-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff3cd;
  border-radius: 20px;
  border: 1px solid #ffeaa7;
  display: inline-flex;
}

.connection-status.connected {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

/* Room Tabs */
.room-tabs {
  display: flex;
  background: #f1f3f4;
  border-radius: 10px;
  padding: 6px;
  gap: 6px;
  margin-bottom: 16px;
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  color: #5f6368;
}
.tab.active {
  background: white;
  color: #202124;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.room-panel {
  display: none;
}
.room-panel.active {
  display: block;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffc107;
  animation: pulse 2s infinite;
}

.connection-status.connected .status-indicator {
  background: #28a745;
  animation: none;
}

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

/* File Drop Zone */
.file-drop-zone {
  border: 3px dashed #dadce0;
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
  margin-bottom: 20px;
}

.file-drop-zone.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
  border-color: #4285f4;
  background: #e8f0fe;
  transform: translateY(-2px);
}

.drop-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
}

.drop-content h3 {
  margin-bottom: 8px;
  color: #202124;
}

.drop-content p {
  color: #5f6368;
  font-size: 0.9rem;
}

/* Selected Files */
.selected-files {
  margin-bottom: 20px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 4px solid #4285f4;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.file-icon {
  font-size: 1.5rem;
  min-width: 24px;
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  color: #202124;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  color: #5f6368;
  font-size: 0.85rem;
}

.file-remove {
  background: none;
  border: none;
  color: #ea4335;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 1.2rem;
}

.file-remove:hover {
  background: #fce8e6;
}

/* Transfer Progress */
.transfer-section {
  display: none;
  margin-bottom: 20px;
}

.transfer-section.active {
  display: block;
}

.transfer-progress {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #dadce0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  margin-bottom: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4285f4, #34a853);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#progress-text {
  font-weight: 600;
  color: #202124;
}

#transfer-speed {
  color: #5f6368;
  font-size: 0.9rem;
}

/* Received Files */
.received-files {
  margin-bottom: 20px;
}

.receive-intro {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #f8f9fa;
  color: #5f6368;
}

.received-files h3 {
  margin-bottom: 15px;
  color: #202124;
}

.files-list {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
}

.received-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #e8f5e8;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 4px solid #34a853;
}

.download-btn {
  background: #34a853;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
}

.download-btn:hover {
  background: #2d8f47;
}

.sent-files {
  margin-top: 20px;
}
.sent-files h3 {
  margin-bottom: 15px;
  color: #202124;
}
.sent-file {
  display: block;
  padding: 12px 16px;
  background: #e8f0fe;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 4px solid #4285f4;
}
.sent-file .line {
  margin-bottom: 6px;
}
.sent-file .status-label,
.incoming-file .status-label,
.recv-file .status-label {
  text-align: left;
  min-width: 0;
  display: block;
}
.sent-file .line:last-child {
  margin-bottom: 0;
}
.sent-meta {
  color: #5f6368;
  font-size: 0.85rem;
}
/* Sent item progress */
.sent-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  justify-content: flex-end;
}
.sent-actions {
  display: flex;
  gap: 6px;
  min-height: 24px;
  align-items: center;
}

.sent-actions:empty::after {
  content: "Login for transfer controls";
  font-size: 0.7rem;
  color: #9aa0a6;
  font-style: italic;
}
.sent-btn {
  background: #f1f3f4;
  border: 1px solid #dadce0;
  color: #5f6368;
  padding: 2px 6px;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}
.sent-btn:hover {
  background: #e8f0fe;
  color: #1a73e8;
}
.sent-btn.cancel {
  color: #d93025;
}
.sent-btn.cancel:hover {
  background: #fce8e6;
  color: #d93025;
}
.status-label.paused {
  color: #a15d00;
}
.status-label.cancelled {
  color: #d93025;
}
.sent-btn.retry {
  color: #1a73e8;
}
.sent-btn.retry:hover {
  background: #e8f0fe;
}
.sent-bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* Hide auth-only elements by default */
.auth-only {
  display: none;
}

/* Show auth-only elements when user is logged in */
body.logged-in .auth-only {
  display: flex;
}

/* Show anonymous info by default */
.anonymous-bulk-info {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #4285f4;
}

.anonymous-bulk-info .info-text {
  font-size: 0.85rem;
  color: #5f6368;
  margin: 0;
}

/* Hide anonymous info when user is logged in */
body.logged-in .anonymous-bulk-info {
  display: none;
}
.btn.small {
  padding: 6px 10px;
  min-height: 34px;
  font-size: 0.75rem;
}
.status-label {
  font-weight: 600;
  color: #3c4043;
  font-size: 0.9rem;
  display: inline-block;
  min-width: 140px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.status-label.sending {
  color: #1a73e8;
}
.status-label.sent {
  color: #188038;
}
.sent-progress {
  width: 100%;
}
.sent-progress-bar {
  width: 100%;
  height: 6px;
  background: #dfe3eb;
  border-radius: 4px;
  overflow: hidden;
}
.sent-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4285f4, #34a853);
  transition: width 0.2s ease;
}

/* Receiving (per-file) */
.receiving-files {
  margin-top: 20px;
}
.receiving-files h3 {
  margin-bottom: 15px;
  color: #202124;
}
.recv-file {
  display: block;
  padding: 12px 16px;
  background: #e6f4ea; /* light green */
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 4px solid #34a853;
}
.recv-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  justify-content: flex-end;
}
.recv-status {
  font-weight: 600;
  color: #1e8e3e;
  font-size: 0.9rem;
}
.recv-progress {
  width: 100%;
}
.recv-progress-bar {
  width: 100%;
  height: 6px;
  background: #d7eadf;
  border-radius: 4px;
  overflow: hidden;
}
.recv-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34a853, #0f9d58);
  transition: width 0.2s ease;
}

/* Incoming (Receive) per-file progress */
.incoming-file {
  display: block;
  padding: 12px 16px;
  background: #eefaf0;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 4px solid #34a853;
}
.incoming-file .line {
  margin-bottom: 6px;
}
.incoming-file .line:last-child {
  margin-bottom: 0;
}
.recv-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  justify-content: flex-end;
}
.status-label.receiving {
  color: #188038;
}
.status-label.received {
  color: #155724;
}
.recv-progress {
  width: 100%;
}
.recv-progress-bar {
  width: 100%;
  height: 6px;
  background: #dfe3eb;
  border-radius: 4px;
  overflow: hidden;
}
.recv-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34a853, #1e8e3e);
  transition: width 0.2s ease;
}
/* Room Actions */
.room-actions {
  text-align: center;
  margin-top: 30px;
}

/* Loading Screen */
.loading-content {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e3f2fd;
  border-top: 4px solid #4285f4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

#loading-text {
  color: #5f6368;
  font-size: 1.1rem;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.modal.hidden {
  display: none;
}

#error-modal {
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}

#error-modal.hidden {
  display: none;
}

#error-modal .modal-content {
  background: white;
  border-radius: 12px;
  padding: 25px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#error-modal .modal-header {
  margin-bottom: 15px;
  border-bottom: 2px solid #ff4444;
}

#error-modal .modal-header h3 {
  color: #ff4444;
  margin: 0 0 10px 0;
}

#error-message {
  color: #333;
  margin: 20px 0;
  line-height: 1.6;
  font-size: 0.95rem;
}

#error-modal .btn {
  width: 100%;
  margin-top: 20px;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  margin: 20px auto;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #4285f4;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #3367d6;
}

/* Firefox scrollbar */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: #4285f4 #f1f1f1;
}

.modal-content h3 {
  margin-bottom: 15px;
  color: #ea4335;
}

.modal-content p {
  margin-bottom: 20px;
  color: #5f6368;
  line-height: 1.4;
}

/* Payment Success Overlay */
.success-open {
  overflow: hidden;
}

.payment-success {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(102, 230, 184, 0.14),
      transparent 38%
    ),
    radial-gradient(circle at 80% 0%, rgba(96, 165, 250, 0.18), transparent 40%),
    rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(6px);
}

.payment-success.hidden {
  display: none;
}

.success-card {
  position: relative;
  max-width: 520px;
  width: 100%;
  background: linear-gradient(135deg, #0b1224, #0f172a);
  border-radius: 24px;
  padding: 28px;
  color: #e9edf8;
  box-shadow: 0 20px 80px rgba(8, 47, 73, 0.45), 0 10px 35px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.close-success {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e9edf8;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-success:hover {
  background: rgba(255, 255, 255, 0.16);
}

.success-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  margin-bottom: 12px;
}

.success-ring {
  width: 120px;
  height: 120px;
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 4;
}

.ring-progress {
  fill: none;
  stroke: #4ade80;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 175;
  stroke-dashoffset: 175;
  animation: ring-draw 1.2s ease forwards;
}

.ring-check {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: check-draw 0.7s ease 0.45s forwards;
}

.success-confetti {
  width: 160px;
  height: 80px;
  opacity: 0.85;
  position: absolute;
  top: -10px;
  right: -6px;
  pointer-events: none;
}

.spark {
  fill: #93c5fd;
  animation: spark-float 3s ease-in-out infinite;
  opacity: 0.9;
}

.spark-2 {
  fill: #c4b5fd;
  animation-delay: 0.35s;
}

.spark-3 {
  fill: #6ee7b7;
  animation-delay: 0.55s;
}

.spark-4 {
  fill: #fbbf24;
  animation-delay: 0.75s;
}

.spark-5 {
  fill: #f472b6;
  animation-delay: 0.95s;
}

.success-body {
  text-align: center;
  padding: 6px 6px 2px;
}

.success-body h2 {
  font-size: 1.6rem;
  margin: 6px 0 8px;
  letter-spacing: -0.02em;
}

.success-copy {
  color: #c7d2fe;
  margin: 0 auto 14px;
  line-height: 1.6;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9db8ff;
  margin: 0;
}

.success-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e9edf8;
  font-size: 0.85rem;
}

.pill.green {
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.28);
  color: #bbf7d0;
}

.pill.subtle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e9edf8;
}

.btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

@keyframes ring-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes spark-float {
  0% {
    transform: translateY(6px) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-6px) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translateY(6px) scale(1);
    opacity: 0.9;
  }
}

/* Responsive Design */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .container {
    border-radius: 16px;
    min-height: calc(100vh - 20px);
  }

  header {
    padding: 20px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .screen {
    padding: 20px;
  }

  .file-drop-zone {
    padding: 30px 15px;
  }

  .drop-icon {
    font-size: 2.5rem;
  }

  .features {
    gap: 15px;
  }

  .feature {
    padding: 15px;
  }

  /* Mobile: stack file rows and stretch progress */
  .sent-file,
  .incoming-file,
  .received-file,
  .recv-file {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .sent-right,
  .recv-right {
    width: 100%;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    justify-content: flex-start;
  }

  .sent-progress,
  .recv-progress {
    width: 100%;
  }

  /* Override desktop stabilization to fit narrow screens */
  .status-label {
    min-width: 0;
    text-align: left;
  }

  .files-list {
    max-height: 45vh;
  }
}

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

.loading .auth-buttons,
.loading .user-menu {
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.mb-20 {
  margin-bottom: 20px;
}

/* File Type Icons */
.file-icon::before {
  content: "📄";
}

.file-icon.image::before {
  content: "🖼️";
}

.file-icon.video::before {
  content: "🎥";
}

.file-icon.audio::before {
  content: "🎵";
}

.file-icon.document::before {
  content: "📝";
}

.file-icon.archive::before {
  content: "📦";
}

.file-icon.code::before {
  content: "💻";
}

/* Authentication Styles */
.auth-buttons {
  display: flex;
  gap: 10px;
}

.auth-buttons .btn {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.auth-buttons .btn.small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* User Menu */
.user-menu {
  position: relative;
  cursor: pointer;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s;
}

.user-info:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-avatar {
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown-item.premium-btn {
  color: #f57c00;
  font-weight: 600;
  background: linear-gradient(135deg, #fff9e6, #ffe8cc);
}

.dropdown-item.premium-btn:hover {
  background: linear-gradient(135deg, #ffe8cc, #ffd699);
}

/* Authentication Modals */
.auth-modal {
  max-width: 460px;
  width: 90%;
  max-height: 90vh;
  padding: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.auth-modal::-webkit-scrollbar {
  width: 6px;
}

.auth-modal::-webkit-scrollbar-track {
  background: transparent;
}

.auth-modal::-webkit-scrollbar-thumb {
  background: rgba(66, 133, 244, 0.3);
  border-radius: 10px;
}

.auth-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(66, 133, 244, 0.5);
}

.auth-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4285f4, #34a853, #fbbc04, #ea4335);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.close-btn:hover {
  background: #fff;
  color: #333;
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-header {
  text-align: center;
  padding: 50px 40px 30px;
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.05) 0%, rgba(52, 168, 83, 0.05) 100%);
}

.auth-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.auth-header h3 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  color: #1a1a1a;
  font-weight: 700;
}

.auth-header p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

.auth-form {
  padding: 30px 40px 40px;
}

.input-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  z-index: 1;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.auth-input {
  width: 100%;
  padding: 16px 16px 16px 50px;
  border: 2px solid #e8ecf0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fff;
  color: #333;
}

.auth-input:focus {
  outline: none;
  border-color: #4285f4;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

.auth-input:focus + .input-icon {
  opacity: 1;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 1.2rem;
  opacity: 0.5;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.toggle-password:hover {
  opacity: 1;
  background: rgba(66, 133, 244, 0.1);
}

.eye-icon {
  display: block;
}

.auth-submit {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #4285f4 0%, #3367d6 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
  position: relative;
  overflow: hidden;
}

.auth-submit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.auth-submit:hover::before {
  width: 300px;
  height: 300px;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.auth-submit:active {
  transform: translateY(0);
}

.btn-arrow {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.auth-submit:hover .btn-arrow {
  transform: translateX(5px);
}

.auth-divider {
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: linear-gradient(to right, transparent, #ddd, transparent);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-divider span {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  padding: 0 15px;
  color: #999;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.auth-switch {
  width: 100%;
  padding: 14px 24px;
  background: transparent;
  color: #666;
  border: 2px solid #e8ecf0;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-switch:hover {
  background: #f8f9ff;
  border-color: #4285f4;
  color: #4285f4;
  transform: translateY(-1px);
}

.auth-switch strong {
  font-weight: 700;
}

/* Input animations */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.auth-input.error {
  border-color: #ea4335;
  animation: shake 0.3s ease;
}

.auth-input.error:focus {
  box-shadow: 0 0 0 4px rgba(234, 67, 53, 0.1);
}

/* Loading state for auth button */
.auth-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.auth-submit.loading .btn-arrow {
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Mobile Responsive Styles for Auth Modals */
@media (max-width: 768px) {
  .auth-modal {
    width: 95%;
    max-height: 85vh;
    border-radius: 20px;
  }

  .auth-header {
    padding: 40px 25px 25px;
  }

  .auth-icon {
    font-size: 3rem;
    margin-bottom: 12px;
  }

  .auth-header h3 {
    font-size: 1.5rem;
  }

  .auth-header p {
    font-size: 0.9rem;
  }

  .auth-form {
    padding: 25px 25px 30px;
  }

  .close-btn {
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .auth-modal {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .auth-header {
    padding: 35px 20px 20px;
  }

  .auth-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
  }

  .auth-header h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
  }

  .auth-header p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .auth-form {
    padding: 20px 20px 25px;
  }

  .input-wrapper {
    margin-bottom: 16px;
  }

  .input-icon {
    left: 12px;
    font-size: 1.1rem;
  }

  .auth-input {
    padding: 14px 14px 14px 45px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .toggle-password {
    right: 10px;
    padding: 6px;
    font-size: 1.1rem;
  }

  .auth-submit {
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 10px;
    margin-top: 8px;
  }

  .btn-arrow {
    font-size: 1.1rem;
  }

  .auth-divider {
    margin: 20px 0;
  }

  .auth-divider span {
    font-size: 0.8rem;
    padding: 0 12px;
  }

  .auth-switch {
    padding: 12px 20px;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .close-btn {
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
  }
}

@media (max-width: 360px) {
  .auth-header {
    padding: 30px 16px 18px;
  }

  .auth-icon {
    font-size: 2.2rem;
  }

  .auth-header h3 {
    font-size: 1.2rem;
  }

  .auth-form {
    padding: 18px 16px 22px;
  }

  .input-wrapper {
    margin-bottom: 14px;
  }

  .auth-input {
    padding: 12px 12px 12px 42px;
    font-size: 0.9rem;
  }

  .auth-submit {
    padding: 12px 18px;
    font-size: 0.95rem;
  }

  .auth-switch {
    padding: 11px 18px;
    font-size: 0.85rem;
  }
}

/* Smooth scroll for modal */
@media (hover: none) and (pointer: coarse) {
  .auth-modal {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
}
  outline: none;
  border-color: #4285f4;
  background: white;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 25px;
}

.form-actions .btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

/* Profile Modal */
.profile-modal {
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.profile-modal::-webkit-scrollbar {
  width: 8px;
}

.profile-modal::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.profile-modal::-webkit-scrollbar-thumb {
  background: #4285f4;
  border-radius: 10px;
}

.profile-modal::-webkit-scrollbar-thumb:hover {
  background: #3367d6;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.profile-info {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 3px solid #4285f4;
  overflow: hidden;
}

.upload-progress {
  margin-top: 10px;
  width: 100%;
}

.upload-progress .progress-bar {
  width: 100%;
  height: 6px;
  background: #e1e5e9;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}

.upload-progress .progress-fill {
  height: 100%;
  background: #4285f4;
  width: 0%;
  transition: width 0.3s ease;
}

.upload-progress span {
  font-size: 0.8rem;
  color: #666;
}

.user-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-details p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.user-details strong {
  color: #333;
  min-width: 120px;
  display: inline-block;
}

.room-history {
  margin-top: 30px;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
}

.room-history h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.1rem;
}

.room-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
}

.room-item {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

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

.room-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.room-id {
  font-family: monospace;
  font-weight: 600;
  color: #4285f4;
  font-size: 0.9rem;
}

.room-role {
  background: #e8f0fe;
  color: #1967d2;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.room-date {
  color: #666;
  font-size: 0.8rem;
}

.no-rooms {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 20px;
  margin: 0;
}

.profile-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.profile-actions .btn {
  flex: 1;
}

/* Button variants */
.btn.danger {
  background: #ea4335;
  color: white;
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .user-dropdown {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }

  .user-dropdown.show {
    transform: translateX(-50%) translateY(0);
  }

  .profile-info {
    flex-direction: column;
    text-align: center;
  }

  .profile-actions {
    flex-direction: column;
  }

  .auth-buttons {
    flex-direction: column;
    width: 100%;
  }

  .room-timer {
    font-size: 0.8rem;
  }
}

/* Room Timer Styles */
.room-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid #ff9800;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: #f57c00;
  margin-top: 10px;
}

.room-timer.warning {
  background: rgba(244, 67, 54, 0.1);
  border-color: #f44336;
  color: #d32f2f;
  animation: pulse 1s infinite;
}

.timer-icon {
  font-size: 1rem;
}

.timer-text {
  font-weight: 500;
}

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

/* Room Expired Modal */
.expired-modal {
  max-width: 450px;
  width: 90%;
}

.expired-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.expired-header .close-modal {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: #333;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.expired-header .close-modal:hover {
  opacity: 1;
  transform: scale(1.05);
}

.expired-content {
  text-align: center;
  margin: 20px 0;
}

.expired-content p {
  margin: 15px 0;
  color: #666;
}

.expired-content strong {
  color: #333;
  font-size: 1.1rem;
}

.expired-content ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  text-align: left;
}

.expired-content li {
  padding: 8px 0;
  color: #4285f4;
  font-weight: 500;
}

.expired-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.expired-actions .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .expired-actions {
    flex-direction: row;
    gap: 12px;
  }

  .expired-actions .btn {
    width: auto;
    flex: 1;
  }
}

/* File Limit Info Styles */
.file-limit {
  font-size: 0.85rem;
  color: #ff9800;
  margin-top: 8px;
  font-weight: 500;
  background: rgba(255, 152, 0, 0.1);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.file-limit.logged-in {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
}

.file-limit.premium {
  color: #f57c00;
  background: linear-gradient(135deg, #fff9e6 0%, #ffe9b3 100%);
  border: 2px solid #ffd700;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Transfer Speed Indicator */
.speed-indicator {
  font-size: 0.8rem;
  color: #666;
  margin-left: 8px;
}

.speed-indicator.throttled {
  color: #d32f2f;
}

.speed-indicator.throttled::after {
  content: " (very limited)";
}

/* Room Limit Modal */
#room-limit-modal {
  z-index: 1002;
}

#room-limit-modal .modal-content {
  max-width: 520px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  border: 1px solid #e5e9f2;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer and Edge */
}

/* Hide scrollbar for WebKit browsers (Chrome, Safari) */
#room-limit-modal .modal-content::-webkit-scrollbar {
  display: none;
}

.limit-modal .modal-body {
  padding: 22px 24px 26px;
}

.limit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border-radius: 12px 12px 0 0;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.limit-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.limit-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.limit-header h3 {
  margin: 2px 0 0;
  font-size: 1.4rem;
  color: #1f2937;
}

.limit-header .close-modal {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #1f2937;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.limit-header .close-modal:hover {
  opacity: 1;
  transform: scale(1.05);
}

.limit-message {
  text-align: center;
  font-size: 1.05rem;
  color: #374151;
  margin: 16px 0 12px;
}

.remaining-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(66, 133, 244, 0.08);
  color: #1a73e8;
  font-weight: 700;
  border: 1px solid rgba(66, 133, 244, 0.2);
  margin: 0 auto 12px;
}

.reset-label {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 10px;
}

.countdown-display {
  position: relative;
  background: linear-gradient(120deg, #1f2937, #243447);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 15px 30px rgba(0, 0, 0, 0.2);
}

.countdown-display::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(66, 133, 244, 0.15),
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 30%,
      rgba(251, 191, 36, 0.12),
      transparent 45%
    );
  pointer-events: none;
}

#countdown-time {
  letter-spacing: 1px;
}

.reset-time-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reset-time-display::before {
  content: "⏱️";
  font-size: 1rem;
}

.limit-icon {
  font-size: 3rem;
  text-align: center;
  margin: 20px 0;
}

.limit-message {
  font-size: 1.1rem;
  color: #333;
  text-align: center;
  margin: 15px 0;
  font-weight: 500;
}

.remaining-count {
  font-size: 1rem;
  color: #ff9800;
  text-align: center;
  margin: 10px 0;
  font-weight: 600;
  background: rgba(255, 152, 0, 0.1);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.limit-benefits {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.limit-benefits h4 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.limit-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.limit-benefits li {
  padding: 8px 0;
  color: #4285f4;
  font-weight: 500;
  display: flex;
  align-items: center;
}

/* Mobile responsive styles for room limit modal */
@media (max-width: 768px) {
  .modal {
    padding: 15px;
    align-items: center; /* Ensure proper centering */
  }

  #room-limit-modal .modal-content {
    max-width: calc(100vw - 30px);
    width: calc(100vw - 30px);
    max-height: calc(100vh - 60px); /* Account for top/bottom spacing */
    padding: 20px 15px;
    margin: 15px 0;
    overflow-y: auto;
  }

  .limit-icon {
    font-size: 2.5rem;
    margin: 15px 0;
  }

  .limit-message {
    font-size: 1rem;
    margin: 12px 0;
  }

  .limit-benefits {
    padding: 15px;
    margin: 15px 0;
  }

  .limit-benefits h4 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .limit-benefits li {
    padding: 6px 0;
    font-size: 0.9rem;
  }

  .remaining-count {
    font-size: 0.9rem;
    padding: 6px 12px;
    margin: 8px 0;
  }

  .reset-countdown {
    padding: 15px;
    margin: 15px 0;
  }

  .reset-countdown h4 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  #countdown-time {
    font-size: 1.5rem;
    min-width: 120px;
  }

  .countdown-display {
    padding: 12px 15px;
    margin: 8px 0;
  }

  .modal-actions {
    gap: 8px;
    margin-top: 20px;
  }

  .modal-actions button {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 10px;
  }

  .limit-header {
    padding: 14px 16px;
  }

  .limit-header h3 {
    font-size: 1.2rem;
  }

  .limit-title {
    gap: 10px;
  }

  #room-limit-modal .modal-content {
    max-width: calc(100vw - 20px);
    width: calc(100vw - 20px);
    max-height: calc(100vh - 40px); /* Proper spacing for small screens */
    padding: 15px 12px;
    margin: 10px 0;
    border-radius: 12px;
  }

  .limit-icon {
    font-size: 2rem;
    margin: 10px 0;
  }

  .limit-message {
    font-size: 0.95rem;
    margin: 10px 0;
  }

  .limit-benefits {
    padding: 12px;
    margin: 12px 0;
  }

  .limit-benefits h4 {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  .limit-benefits li {
    padding: 5px 0;
    font-size: 0.85rem;
  }

  .remaining-count {
    font-size: 0.85rem;
    padding: 5px 10px;
    margin: 6px 0;
  }

  .reset-countdown {
    padding: 12px;
    margin: 12px 0;
  }

  .reset-countdown h4 {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  #countdown-time {
    font-size: 1.3rem;
    min-width: 100px;
  }

  .countdown-display {
    padding: 10px 12px;
    margin: 6px 0;
  }

  .reset-time-display {
    margin-top: 6px;
    padding: 6px 10px;
  }

  #exact-reset-time {
    font-size: 0.85rem;
  }

  .modal-actions {
    gap: 6px;
    margin-top: 15px;
    flex-direction: column;
  }

  .modal-actions button {
    padding: 12px 16px;
    font-size: 0.9rem;
    width: 100%;
    min-width: auto;
  }
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-actions button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.modal-actions .btn-primary {
  background: #4285f4;
  color: white;
}

.modal-actions .btn-primary:hover {
  background: #3367d6;
  transform: translateY(-2px);
}

.modal-actions .btn-secondary {
  background: #f1f3f4;
  color: #333;
  border: 1px solid #dadce0;
}

.modal-actions .btn-secondary:hover {
  background: #e8eaed;
  transform: translateY(-2px);
}

/* Reset Countdown Timer */
.reset-countdown {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  border: 1px solid #e9ecef;
}

.reset-countdown h4 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 600;
}

.countdown-display {
  background: #2c3e50;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 10px 0;
  font-family: "Courier New", monospace;
  border: 2px solid #34495e;
}

#countdown-time {
  font-size: 2rem;
  font-weight: bold;
  color: #4285f4;
  text-shadow: 0 0 10px rgba(66, 133, 244, 0.3);
  transition: color 0.3s ease;
  display: inline-block;
  min-width: 140px;
}

.countdown-display::before {
  content: "⏰";
  font-size: 1.2rem;
  margin-right: 10px;
  vertical-align: middle;
}

.reset-time-display {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(66, 133, 244, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(66, 133, 244, 0.2);
}

#exact-reset-time {
  font-size: 0.95rem;
  color: #4285f4;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Countdown color states handled via JavaScript */

/* Room History Styles */
@keyframes room-card-enter {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.room-history-section {
  margin: 60px 0 40px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05) 0%,
    rgba(118, 75, 162, 0.05) 100%
  );
  border-radius: 16px;
  padding: 25px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.room-history-section h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.5px;
}

.room-history-section h3::before {
  content: "📋";
  font-size: 1.5rem;
  animation: pulse-badge 2s ease-in-out infinite;
}

.room-history-list {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 2px;
}

.room-history-list::-webkit-scrollbar {
  width: 6px;
}

.room-history-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.room-history-list::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.4);
  border-radius: 10px;
}

.room-history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.6);
}

.room-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-radius: 14px;
  background: white;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  animation: room-card-enter 0.5s ease-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 2px;
}

.room-history-item::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  padding: 2px;
  background: conic-gradient(
    from var(--angle, 0deg),
    #4285f4,
    #34a853,
    #fbbc04,
    #ea4335,
    #4285f4
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.room-history-item::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle at center,
    rgba(66, 133, 244, 0.25) 0%,
    rgba(52, 168, 83, 0.15) 40%,
    transparent 70%
  );
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  transform: translate(-50%, -50%);
  left: var(--mouse-x, 50%);
  top: var(--mouse-y, 50%);
  filter: blur(30px);
  z-index: -1;
}

.room-history-item:hover::before {
  opacity: 1;
}

.room-history-item:hover::after {
  opacity: 1;
}

.room-history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.room-history-item > * {
  position: relative;
  z-index: 1;
}

.room-history-item.active {
  background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
  border: 2px solid #28a745;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.room-info {
  flex: 1;
}

.room-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.room-code {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c3e50;
  font-family: "Courier New", monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #4285f4, #34a853);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.room-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #6c757d;
  align-items: center;
}

.room-role {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: #2c3e50;
  background: rgba(66, 133, 244, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.room-role.creator {
  background: rgba(255, 152, 0, 0.1);
  color: #ff6f00;
}

.room-participants {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #495057;
  font-weight: 500;
}

.room-expires {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #e74c3c;
  font-weight: 600;
  background: rgba(231, 76, 60, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.room-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.active-indicator {
  color: #28a745;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  background: rgba(40, 167, 69, 0.15);
  border: 1px solid rgba(40, 167, 69, 0.3);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  animation: pulse-badge 2s ease-in-out infinite;
}

.active-indicator::before {
  content: "●";
  color: #28a745;
  font-size: 0.6rem;
  animation: pulse-badge 2s ease-in-out infinite;
}

.btn.small {
  padding: 8px 14px;
  font-size: 0.85rem;
  min-height: auto;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn.secondary.small {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
}

.btn.secondary.small:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn.danger.small {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: auto;
}

.btn.danger.small:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.3);
}

.btn.danger {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 12px;
  min-width: auto;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn.danger:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.3);
}

.no-rooms {
  text-align: center;
  color: #9ca3af;
  padding: 50px 20px;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

/* Delete Room Button in Room Header */
#delete-room-btn {
  background: #dc3545;
  color: white;
  border: 2px solid #dc3545;
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

#delete-room-btn:hover {
  background: #c82333;
  border-color: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Mobile Responsiveness for Room History */
@media (max-width: 768px) {
  .room-history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .room-details {
    flex-direction: column;
    gap: 8px;
  }

  .room-actions {
    align-self: flex-end;
    width: 100%;
    justify-content: flex-end;
  }
}

/* Premium Modal Styles */
.premium-modal {
  max-width: 500px;
  width: 90%;
  padding: 0;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.premium-modal .modal-header {
  background: linear-gradient(135deg, #f57c00, #ff9800);
  color: white;
  padding: 20px 25px;
  margin: 0;
  border: none;
}

.premium-modal .modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.premium-modal .close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-modal .close-modal:hover {
  opacity: 1;
}

.premium-content {
  padding: 30px 25px;
  flex-grow: 1;
  overflow-y: auto;
}

.premium-content::-webkit-scrollbar {
  width: 8px;
}

.premium-content::-webkit-scrollbar-track {
  background: rgba(200, 200, 200, 0.1);
}

.premium-content::-webkit-scrollbar-thumb {
  background: #4285f4;
  border-radius: 4px;
}

.premium-content::-webkit-scrollbar-thumb:hover {
  background: #1a73e8;
}

.premium-content {
  scrollbar-color: #4285f4 rgba(200, 200, 200, 0.1);
  scrollbar-width: thin;
}

.premium-hero {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #333;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.premium-hero h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 8px;
}

.premium-subtitle {
  color: #666;
  font-size: 1rem;
}

.premium-features {
  margin-bottom: 30px;
}

.premium-features h4 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 15px;
}

.premium-feature-list {
  list-style: none;
  padding: 0;
}

.premium-feature-list li {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.premium-feature-list li:hover {
  background: #fff9e6;
  transform: translateX(5px);
}

.premium-feature-list .feature-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.premium-feature-list .feature-details {
  flex: 1;
}

.premium-feature-list .feature-details strong {
  display: block;
  color: #333;
  font-size: 1rem;
  margin-bottom: 4px;
}

.premium-feature-list .feature-details p {
  color: #666;
  font-size: 0.85rem;
  margin: 0;
}

.premium-pricing {
  text-align: center;
  padding: 25px;
  background: linear-gradient(135deg, #fff9e6, #ffe8cc);
  border-radius: 15px;
  margin-bottom: 25px;
}

.price-tag {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-bottom: 10px;
}

.price-tag .price {
  font-size: 3rem;
  font-weight: 700;
  color: #f57c00;
}

.price-tag .period {
  font-size: 1.2rem;
  color: #666;
}

.trial-info {
  color: #f57c00;
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}

.premium-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.premium-actions .btn {
  width: 100%;
}

.premium-actions .btn.large {
  padding: 18px 24px;
  font-size: 1.1rem;
}

.premium-note {
  text-align: center;
  color: #999;
  font-size: 0.8rem;
  font-style: italic;
  margin: 0;
}

/* Premium Badge in Profile */
.premium-badge-section {
  background: linear-gradient(135deg, #fff9e6 0%, #ffe9b3 100%);
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.premium-status {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 15px;
}

.premium-badge-animated {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #f57c00;
  animation: badge-pulse 2s ease-in-out infinite;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50px;
  border: 2px solid #ffd700;
  width: fit-content;
  align-self: center;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.badge-star {
  font-size: 2rem;
  animation: star-spin 3s linear infinite;
}

.badge-text {
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 1.3rem;
}

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

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

/* Room Exited Modal Animations */
@keyframes wave-hand {
  0%,
  100% {
    transform: rotate(0deg);
    transform-origin: 70% 70%;
  }
  25% {
    transform: rotate(14deg);
    transform-origin: 70% 70%;
  }
  50% {
    transform: rotate(-8deg);
    transform-origin: 70% 70%;
  }
  75% {
    transform: rotate(14deg);
    transform-origin: 70% 70%;
  }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes slide-up-fade {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.room-exited-modal {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-radius: 20px !important;
  max-width: 400px;
  margin: auto;
}

.room-exited-animation {
  text-align: center;
  padding: 40px 30px;
  color: white;
}

.exit-emoji {
  font-size: 80px;
  margin-bottom: 20px;
  animation: wave-hand 2s infinite;
  display: inline-block;
}

.room-exited-animation h2 {
  font-size: 2.5rem;
  margin: 15px 0;
  font-weight: 700;
  animation: slide-up-fade 0.6s ease-out;
}

.exit-message {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 15px 0 30px 0;
  animation: slide-up-fade 0.6s ease-out 0.1s both;
}

.exit-confetti {
  position: relative;
  height: 120px;
  margin: 20px 0;
  pointer-events: none;
}

.confetti {
  position: absolute;
  font-size: 2rem;
  animation: confetti-fall 1.5s ease-out forwards;
}

.confetti-1 {
  left: 10%;
  animation-delay: 0s;
}

.confetti-2 {
  left: 30%;
  animation-delay: 0.1s;
}

.confetti-3 {
  left: 50%;
  animation-delay: 0.2s;
}

.confetti-4 {
  left: 70%;
  animation-delay: 0.15s;
}

.confetti-5 {
  left: 90%;
  animation-delay: 0.25s;
}

#room-exited-continue-btn {
  margin-top: 20px;
  background: white;
  color: #667eea;
  font-weight: 600;
  padding: 12px 40px;
  border-radius: 25px;
  animation: slide-up-fade 0.6s ease-out 0.2s both;
}

#room-exited-continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.premium-details {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.detail-item .label {
  font-weight: 600;
  color: #666;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.detail-item .value {
  color: #333;
  font-size: 1rem;
  font-weight: 600;
}

.renew-date {
  color: #f57c00;
  font-weight: 700;
  font-size: 1.1rem;
}

.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  background: #d4edda;
  color: #155724;
}

.subscription-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.subscription-actions .btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  min-width: 140px;
}

/* Payment History Modal */
.payment-history-modal {
  max-width: 600px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.payment-history-modal::-webkit-scrollbar {
  width: 8px;
}

.payment-history-modal::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.payment-history-modal::-webkit-scrollbar-thumb {
  background: #4285f4;
  border-radius: 10px;
}

.payment-history-modal::-webkit-scrollbar-thumb:hover {
  background: #3367d6;
}

.payment-history-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.subscription-card {
  border-radius: 12px;
  border: 1px solid #e9ecef;
  background: #f8f9fa;
  overflow: hidden;
}

.card-header {
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
  color: white;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1.1rem;
}

.card-body {
  padding: 20px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}

.payment-row:last-child {
  border-bottom: none;
}

.payment-row .label {
  font-weight: 600;
  color: #333;
}

.payment-row .value {
  color: #555;
  text-align: right;
}

.payment-row .value.status {
  color: #28a745;
  font-weight: 600;
}

.payment-row .value.date {
  color: #f57c00;
  font-weight: 600;
}

.payment-row .value.price {
  color: #4285f4;
  font-weight: 700;
  font-size: 1.05rem;
}

.transactions-section {
  border-top: 2px solid #e9ecef;
  padding-top: 20px;
}

.section-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transaction-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.transaction-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.transaction-info h4 {
  margin: 0 0 4px 0;
  color: #333;
  font-size: 1rem;
}

.transaction-info p {
  margin: 0;
  color: #666;
  font-size: 0.85rem;
}

.transaction-amount {
  text-align: right;
}

.transaction-amount .amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: #28a745;
}

.transaction-amount .date {
  font-size: 0.85rem;
  color: #666;
}

.no-transactions {
  text-align: center;
  padding: 30px 20px;
  color: #999;
  font-style: italic;
}

/* Cancel Subscription Modal */
.cancel-modal {
  max-width: 450px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.cancel-modal::-webkit-scrollbar {
  width: 8px;
}

.cancel-modal::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.cancel-modal::-webkit-scrollbar-thumb {
  background: #4285f4;
  border-radius: 10px;
}

.cancel-modal::-webkit-scrollbar-thumb:hover {
  background: #3367d6;
}

.cancel-content {
  padding: 20px 0;
}

.warning-text {
  color: #d32f2f;
  font-weight: 600;
  margin-bottom: 15px;
  padding: 12px;
  background: #ffebee;
  border-radius: 8px;
  border-left: 4px solid #d32f2f;
}

.feature-list {
  list-style: none;
  padding: 15px 20px;
  background: #f5f5f5;
  border-radius: 8px;
  margin: 15px 0;
}

.feature-list li {
  padding: 8px 0;
  color: #d32f2f;
  font-weight: 500;
}

.info-text {
  background: #e3f2fd;
  border-left: 4px solid #4285f4;
  padding: 12px 15px;
  border-radius: 8px;
  margin: 15px 0;
  color: #1976d2;
  font-weight: 500;
}

.small-text {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  margin: 10px 0;
}

.cancel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.cancel-actions .btn {
  width: 100%;
  padding: 12px;
}

/* Profile Section Styling */
.profile-section {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.profile-section h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 600;
}

.profile-section:last-child {
  border-bottom: none;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.profile-info {
  flex: 1;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 3px solid #4285f4;
  overflow: hidden;
  flex-shrink: 0;
}

#profile-username {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 1.3rem;
}

#profile-email {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .modal {
    padding: 15px;
  }

  .modal-content {
    max-height: 85vh;
    padding: 20px;
  }

  .profile-modal {
    max-height: 85vh;
  }

  .payment-history-modal {
    max-height: 85vh;
    width: 90%;
  }

  .cancel-modal {
    max-height: 85vh;
  }

  .premium-modal {
    max-height: 85vh;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 10px;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
  }

  .modal-content {
    max-height: calc(100vh - 80px);
    padding: 15px;
    margin: 0;
    border-radius: 12px;
  }

  .profile-modal {
    max-height: calc(100vh - 60px);
    width: 95%;
  }

  .payment-history-modal {
    max-height: calc(100vh - 60px);
    width: 95%;
  }

  .cancel-modal {
    max-height: calc(100vh - 60px);
    width: 95%;
  }

  .premium-modal {
    max-width: 95%;
    max-height: calc(100vh - 60px);
    width: 95%;
  }

  .premium-hero h2 {
    font-size: 1.6rem;
  }

  .price-tag .price {
    font-size: 2.5rem;
  }

  .premium-feature-list li {
    padding: 12px;
  }

  .premium-feature-list .feature-icon {
    font-size: 1.5rem;
  }

  .premium-badge-animated {
    font-size: 1.4rem;
    padding: 12px 20px;
  }

  .badge-star {
    font-size: 1.6rem;
  }

  .badge-text {
    font-size: 1.1rem;
  }

  .premium-details {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .detail-item {
    padding: 10px;
  }

  .detail-item .label {
    font-size: 0.75rem;
  }

  .detail-item .value {
    font-size: 0.95rem;
  }

  .subscription-actions {
    justify-content: center;
    gap: 8px;
  }

  .subscription-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .payment-history-modal {
    max-width: 95%;
  }

  .payment-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .payment-row .value {
    text-align: left;
    margin-top: 5px;
  }

  .transaction-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .transaction-amount {
    text-align: left;
    margin-top: 8px;
  }

  .cancel-modal {
    max-width: 95%;
  }
}
