/* MT5 Strategy Builder - Web Version Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #ffffff;
  color: #333333;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
}

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

/* Large Promotional Header */
.promo-header {
  background: #ffffff;
  padding: 25px 30px;
  border-bottom: 1px solid #e0e0e0;
}

.promo-main {
  max-width: 1400px;
  margin: 0 auto;
}

.promo-title {
  font-size: 32px;
  font-weight: 800;
  color: #333333;
  margin: 0 0 8px 0;
  text-align: center;
  letter-spacing: -0.5px;
}

.promo-subtitle {
  font-size: 16px;
  color: #666666;
  text-align: center;
  margin: 0 0 20px 0;
  font-weight: 500;
}

.promo-cta-large {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 25px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
  border: 2px solid #333333;
  min-width: 280px;
}

.cta-btn:hover {
  transform: translateY(-2px);
}

.cta-btn-github {
  background: #ffffff;
  color: #333333;
  border-color: #333333;
}

.cta-btn-github:hover {
  background: #f5f5f5;
}

.cta-btn-contact {
  background: #ffffff;
  color: #333333;
  border-color: #666666;
}

.cta-btn-contact:hover {
  background: #f5f5f5;
  border-color: #333333;
}

.cta-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.cta-text strong {
  font-size: 16px;
  display: block;
}

.cta-text small {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
}

/* Demo Warning Banner */
.demo-warning {
  background: #f5f5f5;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.demo-warning-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 15px;
}

.demo-warning-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.demo-warning-text {
  color: #333333;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.demo-warning-text strong {
  font-size: 16px;
  display: inline-block;
  margin-right: 8px;
}

.demo-download-link {
  color: #333333;
  text-decoration: underline;
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.demo-download-link:hover {
  color: #000000;
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
}

.toolbar h1 {
  font-size: 20px;
  color: #4CAF50;
  margin-right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-badge {
  background: #ff6b35;
  color: white;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  background: #ffffff;
  color: #333333;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary {
  background: #2196F3;
  color: white;
  border-color: #2196F3;
}

.btn-secondary {
  background: #f5f5f5;
  color: #333333;
  border-color: #ccc;
}

.btn-success {
  background: #4CAF50;
  color: white;
  border-color: #4CAF50;
}

.btn-danger {
  background: #f44336;
  color: white;
  border-color: #f44336;
}

.btn-warning {
  background: #ff9800;
  color: white;
  border-color: #ff9800;
}

.btn-info {
  background: #667eea;
  color: white;
  border-color: #667eea;
  font-weight: 600;
}

.btn-github-toolbar {
  background: #24292e;
  color: white;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  display: inline-block;
  border: 1px solid #24292e;
}

.btn-github-toolbar:hover {
  background: #1a1e22;
  transform: translateY(-1px);
}

.btn-small {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-large {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
}

/* Main Layout */
.main-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 600px;
}

.top-section {
  display: flex;
  flex: 1;
  min-height: 500px;
}

/* Sidebars */
.sidebar {
  width: 220px;
  background: #f8f8f8;
  border-right: 1px solid #e0e0e0;
  overflow-y: auto;
  padding: 15px;
  max-height: 500px;
}

.sidebar h3 {
  font-size: 14px;
  color: #666666;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.right-sidebar {
  border-right: none;
  border-left: 1px solid #e0e0e0;
}

/* Node Categories */
.node-category {
  margin-bottom: 20px;
}

.node-category h4 {
  font-size: 12px;
  color: #888888;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.node-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 5px;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333333;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.node-btn:hover {
  background: #f5f5f5;
  border-color: #4CAF50;
}

.trigger-btn { border-left: 3px solid #ff9800; }
.signal-btn { border-left: 3px solid #2196F3; }
.control-btn { border-left: 3px solid #607D8B; }

/* Editor Container */
.editor-container {
  flex: 1;
  position: relative;
  background: #1e1e1e;
  min-height: 400px;
  height: 500px;
}

#nodeCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 11px;
  color: #888;
  text-align: center;
  line-height: 1.6;
  pointer-events: none;
}

/* Properties Panel */
.properties-panel, .account-panel {
  background: #242424;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.properties-panel h3, .account-panel h3 {
  font-size: 13px;
  margin-bottom: 12px;
  color: #4CAF50;
}

.no-selection {
  color: #666;
  font-size: 12px;
  font-style: italic;
}

/* Account Info */
.info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.info-item .label {
  color: #888;
}

.profit.positive { color: #4CAF50; }
.profit.negative { color: #f44336; }

/* Bottom Panel */
.bottom-panel {
  height: 250px;
  background: #1a1a1a;
  border-top: 1px solid #333;
  overflow-y: auto;
  transition: height 0.3s;
  flex-shrink: 0;
}

.bottom-panel.collapsed {
  height: 40px;
}

.positions-panel {
  height: 100%;
  padding: 10px 20px;
  overflow-y: auto;
}

.positions-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.positions-tab-btn {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid #444;
  border-radius: 4px;
  color: #888;
  cursor: pointer;
  font-size: 12px;
}

.positions-tab-btn.active {
  background: #4CAF50;
  border-color: #4CAF50;
  color: white;
}

.positions-tab {
  display: none;
}

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

.positions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.position-item {
  background: #242424;
  border-radius: 6px;
  padding: 12px;
  border-left: 3px solid #4CAF50;
}

.position-item.closed {
  border-left-color: #666;
  opacity: 0.8;
}

.position-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.position-symbol {
  font-weight: 600;
  color: #fff;
}

.position-type {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

.position-type.buy { background: #4CAF50; color: white; }
.position-type.sell { background: #f44336; color: white; }

.position-details {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #888;
}

.position-profit.positive { color: #4CAF50; font-weight: 600; }
.position-profit.negative { color: #f44336; font-weight: 600; }

.position-actions {
  margin-top: 8px;
}

.no-data {
  color: #666;
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 25px;
  min-width: 400px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #333;
}

.modal-content h2 {
  margin-bottom: 20px;
  color: #4CAF50;
  font-size: 18px;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: #888;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 13px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #4CAF50;
}

/* Trade Modal */
.trade-modal {
  min-width: 450px;
}

.current-price-display {
  display: flex;
  gap: 20px;
  background: #2a2a2a;
  padding: 12px;
  border-radius: 6px;
}

.price-info {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 11px;
  color: #888;
}

.price-value {
  font-size: 16px;
  font-weight: 600;
  color: #4CAF50;
}

/* Log Modal */
.log-modal {
  min-width: 600px;
}

.log-content {
  background: #0a0a0a;
  border-radius: 6px;
  padding: 15px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Consolas', monospace;
  font-size: 12px;
}

.log-entry {
  padding: 4px 0;
  border-bottom: 1px solid #222;
}

.log-entry.error { color: #f44336; }
.log-entry.warning { color: #ff9800; }
.log-entry.info { color: #2196F3; }

.log-time {
  color: #666;
  margin-right: 10px;
}

.log-type {
  margin-right: 10px;
}

.no-log {
  color: #666;
  text-align: center;
  padding: 20px;
}

/* Message Box */
.message-box {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.message-box.show {
  transform: translateX(-50%) translateY(0);
}

.message-box.success {
  background: #4CAF50;
  color: white;
}

.message-box.error {
  background: #f44336;
  color: white;
}

.message-box.info {
  background: #2196F3;
  color: white;
}

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

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 180px;
    max-height: 450px;
  }
  
  .toolbar h1 {
    font-size: 14px;
  }
  
  .editor-container {
    height: 450px;
  }
  
  .bottom-panel {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .main-layout {
    min-height: 800px;
  }
  
  .top-section {
    flex-direction: column;
    min-height: 600px;
  }
  
  .sidebar {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .right-sidebar {
    border-left: none;
    border-top: 1px solid #e0e0e0;
  }
  
  .editor-container {
    height: 400px;
    min-height: 300px;
  }
  
  .toolbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 20px;
  }
  
  .modal-content {
    min-width: auto;
    width: 95%;
  }
  
  .bottom-panel {
    height: 200px;
  }
}

/* About Modal */
.about-modal {
  min-width: 800px;
  max-width: 900px;
}

.about-content {
  max-height: 75vh;
  overflow-y: auto;
}

.about-highlight-box {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: #000;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(255,107,53,0.3);
}

.about-highlight-box h3 {
  color: #000;
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 800;
}

.about-highlight-box p {
  color: #000;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
}

.about-section {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid #333;
}

.about-section:last-of-type {
  border-bottom: none;
}

.about-section h3 {
  color: #667eea;
  font-size: 20px;
  margin-bottom: 15px;
  font-weight: 700;
}

.about-section p {
  color: #b0b0b0;
  line-height: 1.6;
  margin-bottom: 10px;
  font-size: 15px;
}

.feature-list-large {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-list-large li {
  padding: 12px 15px;
  color: #e0e0e0;
  font-size: 15px;
  background: #2a2a2a;
  border-radius: 8px;
  border-left: 4px solid #4CAF50;
  line-height: 1.5;
}

.feature-list-large li strong {
  color: #4CAF50;
  font-size: 16px;
}

.cta-buttons-large {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.btn-mega {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 25px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-mega:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

.btn-mega-primary {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

.btn-mega-secondary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-mega-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.btn-mega-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.btn-mega-content strong {
  font-size: 18px;
  font-weight: 700;
}

.btn-mega-content small {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 400;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: #2a2a2a;
  border-radius: 10px;
  transition: all 0.3s;
  text-decoration: none;
  border: 2px solid transparent;
}

.contact-card:hover {
  background: #333;
  transform: translateY(-3px);
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.contact-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.contact-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-card-content strong {
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 600;
}

.contact-card-content span {
  color: #888;
  font-size: 12px;
}

.about-footer-large {
  text-align: center;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px solid #333;
}

.about-footer-main {
  font-size: 16px;
  color: #4CAF50;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-footer-sub {
  font-size: 14px;
  color: #888;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .promo-title {
    font-size: 24px;
  }
  
  .promo-subtitle {
    font-size: 14px;
  }
  
  .promo-cta-large {
    flex-direction: column;
  }
  
  .cta-btn {
    width: 100%;
    min-width: auto;
  }
  
  .demo-warning-content {
    flex-direction: column;
    text-align: center;
  }
  
  .demo-warning-text {
    font-size: 13px;
  }
  
  .about-modal {
    min-width: 90%;
  }
  
  .feature-list-large li {
    font-size: 14px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .btn-mega {
    padding: 15px 20px;
  }
  
  .btn-mega-icon {
    font-size: 28px;
  }
  
  .btn-mega-content strong {
    font-size: 16px;
  }
}
