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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

.container {
  max-width: 90%;
  margin: 0 auto;
  padding: 20px;
}

.video-container {
  margin: 20px 0;
}

video {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: none; /* Initially hidden */
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  color: #2c3e50;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.tabs {
  display: flex;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.tab {
  flex: 1;
  padding: 15px 20px;
  background: #e9ecef;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tab.active {
  background: #fff;
  color: #007bff;
}

.tab:hover {
  background: #dee2e6;
}

.tab.active:hover {
  background: #fff;
}

.tab-content {
  background: #fff;
  min-height: 500px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-panel {
  display: none;
  padding: 20px;
}

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

.loading {
  text-align: center;
  padding: 50px;
  color: #6c757d;
}

.trade-item, .signal-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 20px;
  background: #fafafa;
  transition: box-shadow 0.3s ease;
}

.trade-item:hover, .signal-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.item-info h3 {
  color: #2c3e50;
  margin-bottom: 0;
  font-size: 1.1rem;
}

.trade-details {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 15px;
}

.trade-detail {
  background: #f8f9fa;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.trade-detail:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.trade-detail.entry {
  background: white;
  /*color: #1565c0;*/
  border-color: white;
}

.trade-detail.sl {
  background: white;
  color: #c62828;
  border-color: white;
}

.trade-detail.maxloss {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: #c62828;
  border-color: white;
}

.trade-detail.qty {
  background: white;
  /*color: #6a1b9a;*/
  border-color: white;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.status-traded {
  background: #b1bae3;
  color: #2e3b71;
}

.status-signal {
  background: #e9ebfa;
  color: #2e3b71;
}

.width-40 {
  width: 40%;
}

.side-buy {
  background: #d4edda;
  color: #155724;
}

.side-sell {
  background: #f8d7da;
  color: #721c24;
}

.signal-confidence {
  background: #e6e695;
  color: black;
}

.time-stamp {
  background: #f8f9fa;
  color: #6c757d;
}

.journal-section {
  display: grid;
  grid-template-columns: 5fr 1fr auto;
  gap: 15px;
  align-items: start;
}

.journal-editor {
  /*min-height: 200px;*/
  /*max-height: 200px;*/
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
}

.journal-editor .ql-editor {
  /*height: 150px;*/
  /*max-height: 150px;*/
  /*overflow-y: auto;*/
  font-size: 14px;
}

.journal-editor .ql-container {
  border: 1px solid #ced4da;
  border-radius: 6px;
  height: 150px;
}

.journal-editor:focus-within {
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.pnl-input {
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.pnl-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.save-btn {
  padding: 12px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.save-btn:hover {
  background: #0056b3;
}

.save-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid #dee2e6;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.pagination button:hover {
  background: #e9ecef;
}

.pagination button:disabled {
  background: #f8f9fa;
  cursor: not-allowed;
  color: #6c757d;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.95);
}

.modal-content {
  background-color: transparent;
  margin: 0;
  padding: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  position: relative;
  max-height: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close {
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  position: fixed;
  right: 30px;
  top: 30px;
  z-index: 10001;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.close:hover {
  color: #ff0000;
  background: rgba(0,0,0,0.9);
  transform: scale(1.1);
}

/* Video fills maximum possible space while maintaining aspect ratio */
.modal video {
  max-width: 95vw !important;
  max-height: 95vh !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  background: #000;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.modal h3 {
  display: none;
}

@media (max-width: 768px) {
  .item-header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .journal-section {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* Space between logo and text */
}

.logo {
  height: 40px; /* Adjust size as needed */
  width: auto;
}

.header h1 {
  margin: 0; /* Remove default margin from h1 */
}