html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #667eea;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
}

/* Promo Banner */
.promo-banner {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
}

.promo-banner.show {
  display: block;
}

.promo-banner-wrapper {
  position: relative;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.promo-banner-content {
  flex: 1;
  text-align: left;
  max-width: 1200px;
}

.promo-banner-title {
  color: white;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.promo-banner-description {
  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
  margin: 0;
  line-height: 1.6;
  font-weight: 400;
}

.promo-banner-dismiss {
  right: 20px;
  top: 35%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.promo-banner-dismiss:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.promo-banner-dismiss svg {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .promo-banner {
    padding: 20px 20px;
  }

  .promo-banner-wrapper {
    flex-direction: column;
    gap: 16px;
  }

  .promo-banner-title {
    font-size: 22px;
  }

  .promo-banner-description {
    font-size: 14px;
  }

  .promo-banner-dismiss {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px 40px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  display: none;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-banner.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-banner-content {
  flex: 1;
  text-align: left;
}

.cookie-banner-title {
  color: white;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-banner-description {
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  outline: none;
}

.cookie-banner-btn svg {
  flex-shrink: 0;
}

.cookie-banner-btn-primary {
  background: white;
  color: #667eea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cookie-banner-btn-primary:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cookie-banner-btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.cookie-banner-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .cookie-banner {
    padding: 16px 20px;
  }

  .cookie-banner-wrapper {
    flex-direction: column;
    gap: 16px;
  }

  .cookie-banner-content {
    text-align: center;
  }

  .cookie-banner-title {
    font-size: 18px;
  }

  .cookie-banner-description {
    font-size: 13px;
  }

  .cookie-banner-actions {
    width: 100%;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .cookie-banner-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Global Header */
.builder-header {
  background-color: white;
  border-bottom: 2px solid #dee2e6;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.builder-header h2 {
  margin: 0;
  color: #212529;
  font-weight: 600;
  font-size: 24px;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.header-logo:hover {
  opacity: 0.8;
}

.builder-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Google Sign-in Button */
.btn-google-signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  border: none;
}

.btn-google-signin:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

.btn-google-signin svg {
  flex-shrink: 0;
}

/* Header Primary Button */
.btn-header-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  border: none;
}

.btn-header-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  color: white !important;
  text-decoration: none;
}

/* Header Help Button */
.btn-header-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-header-help:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: #667eea;
  color: #764ba2;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-header-help svg {
  flex-shrink: 0;
}

/* Header Docs Button */
.btn-header-docs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-header-docs:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: #667eea;
  color: #764ba2;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-header-docs svg {
  flex-shrink: 0;
}

.dropdown-item-container {
  display: flex;
  align-items: center;
  gap: 7px;
}

@media (max-width: 768px) {
  .builder-header {
    padding: 12px 20px;
  }

  .builder-header h2 {
    font-size: 20px;
  }

  .btn-google-signin,
  .btn-header-primary {
    padding: 8px 16px;
    font-size: 0.875rem;
  }

  .btn-header-help,
  .btn-header-docs {
    padding: 6px 12px;
    font-size: 0.875rem;
  }

  .btn-google-signin svg,
  .btn-header-help svg,
  .btn-header-docs svg {
    width: 16px;
    height: 16px;
  }
}

/* Home Page */
.home-container {
  width: 100%;
  margin: 0;
  padding: 60px 0;
  min-height: calc(100vh - 80px);
}

.home-container .container {
  max-width: 100%;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .home-container {
    padding: 40px 0;
  }

  .home-container .container {
    padding: 0 20px;
  }
}

/* EA Builder Styles */
.builder-container {
  width: 100%;
  max-width: 100%;
  padding: 12px 40px 24px 40px;
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

.ea-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding-bottom: 6px;
}

.ea-builder-header .ea-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #212529;
}

@media (max-width: 768px) {
  .ea-builder-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .ea-builder-header .ea-name {
    font-size: 20px;
  }
}

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

/* Board Layout */
.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  flex: 1;
  min-height: 0;
}

@media (max-width: 1400px) {
  .board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .board {
    grid-template-columns: 1fr;
  }
}

/* Board Column */
.board-column {
  background-color: #e9ecef;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #dee2e6;
}

.column-title-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.column-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #495057;
}

.info-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.info-icon {
  color: #adb5bd;
  transition: color 0.2s;
}

.info-icon-wrapper:hover .info-icon {
  color: #495057;
}

.info-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  background-color: #212529;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  white-space: normal;
  width: 200px;
  text-align: center;
  line-height: 1.4;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.info-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #212529;
}

.info-icon-wrapper:hover .info-tooltip {
  opacity: 1;
}

.item-count {
  background-color: #6c757d;
  color: white;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}

.column-content {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 12px;
}

/* Signal Sections */
.signal-section {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
}

.signal-section:last-child {
  margin-bottom: 0;
}

.signal-type {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  margin: 0 0 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.signal-items {
  min-height: 40px;
  margin-bottom: 8px;
}

.btn-add-signal {
  width: 100%;
  padding: 4px 8px;
  background-color: transparent;
  border: 2px dashed #adb5bd;
  border-radius: 4px;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-add-signal:hover {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: #6c757d;
  color: #495057;
}

/* Empty State */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
}

.empty-state p {
  font-size: 14px;
  font-style: italic;
}

/* Add Item Button */
.btn-add-item {
  width: 100%;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.7);
  border: 2px dashed #adb5bd;
  border-radius: 6px;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn-add-item:hover {
  background-color: white;
  border-color: #6c757d;
  color: #495057;
  text-decoration: none;
}

/* Card Items (for future use) */
.board-card {
  background-color: white;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.board-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.board-card h6 {
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: #212529;
}

.board-card p {
  margin: 0;
  font-size: 12px;
  color: #6c757d;
}

/* Radio Cards (for Money Management) */
.radio-card {
  background-color: white;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  padding-left: 40px;
}

.radio-card:hover {
  border-color: #adb5bd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.radio-card.selected {
  border-color: #667eea;
  background-color: #f5f3ff;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
}

.radio-indicator {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid #adb5bd;
  border-radius: 50%;
  background-color: white;
  transition: all 0.2s;
}

.radio-card.selected .radio-indicator {
  border-color: #667eea;
  border-width: 6px;
}

.radio-card h6 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: #212529;
}

.radio-card p {
  margin: 0;
  font-size: 12px;
  color: #6c757d;
  line-height: 1.4;
}

.radio-card.selected h6 {
  color: #667eea;
}

.radio-card.selected p {
  color: #495057;
}

/* Expert Advisor Page Buttons */
.btn-ea-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  border: none;
}

.btn-ea-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  color: white !important;
  text-decoration: none;
}

.btn-ea-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: white;
  color: #667eea;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid #667eea;
}

.btn-ea-outline:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-ea-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: #f8f9fa;
  color: #495057;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid #dee2e6;
}

.btn-ea-secondary:hover {
  background: #e9ecef;
  color: #212529;
  border-color: #adb5bd;
  text-decoration: none;
}

.btn-ea-secondary-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  background: #f8f9fa;
  color: #495057;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid #dee2e6;
}

.btn-ea-secondary-sm:hover {
  background: #e9ecef;
  color: #212529;
  border-color: #adb5bd;
  text-decoration: none;
  transform: translateY(-1px);
}

/* EA Card Styles */
.ea-card {
  background: white;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ea-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.ea-card-title {
  color: #212529;
  font-weight: 600;
  font-size: 1.1rem;
}

.ea-card-text {
  color: #6c757d;
  font-size: 0.95rem;
}

/* EA Alert Info */
.alert-ea-info {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  color: #212529;
}

.alert-ea-info h5 {
  color: #667eea;
  font-weight: 600;
}

/* EA List Styles */
.ea-list {
  background: white;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ea-list-header {
  display: grid;
  grid-template-columns: 50px 1.5fr 2fr 1.5fr 1.5fr 2fr;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
}

.ea-list-item {
  display: grid;
  grid-template-columns: 50px 1.5fr 2fr 1.5fr 1.5fr 2fr;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
  transition: all 0.2s ease;
  align-items: center;
}

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

.ea-list-item:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.ea-list-col-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ea-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.ea-icon-badge:hover {
  transform: scale(1.1);
}

.ea-list-col-name {
  font-size: 0.95rem;
}

.ea-list-col-description {
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-list-col-updated {
  font-size: 0.85rem;
}

.ea-list-col-actions {
  text-align: right;
}

@media (max-width: 992px) {
  .ea-list-header,
  .ea-list-item {
    grid-template-columns: 50px 1.5fr 1fr 1.5fr;
    gap: 12px;
  }

  .ea-list-col-description,
  .ea-list-col-tags {
    display: none;
  }

  .ea-list-col-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 576px) {
  .ea-list-header {
    display: none;
  }

  .ea-list-item {
    grid-template-columns: 50px 1fr auto;
    gap: 8px;
  }

  .ea-list-col-description,
  .ea-list-col-tags,
  .ea-list-col-updated {
    display: none;
  }

  .ea-list-col-name {
    text-align: left;
    display: flex;
    align-items: center;
  }

  .ea-list-col-actions {
    display: flex;
    align-items: center;
    text-align: right;
  }

  .backtest-btn-desktop {
    display: none;
  }

  .ea-list-col-actions a {
    white-space: nowrap;
  }
}