/* ============================================
   STOCKKIT.AI — Public Website Styles
   ============================================ */

/* CSS Variables */
:root {
  --primary-blue: #4D95F9;
  --dark-navy: #0F0053;
  --cyan-accent: #00bcd4;
  --orange-accent: #ff9800;
  --success-green: #4caf50;
  --error-red: #f44336;
  --text-dark: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-light: #f8f9fa;
  --bg-dark: #1a1a2e;
  --white: #ffffff;
  --border-light: #e0e0e0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--dark-navy);
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark-navy);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-light {
  background: var(--bg-light);
}

/* Header & Navigation */
.header {
  background: var(--white);
  border-bottom: 3px solid var(--cyan-accent);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--dark-navy);
  letter-spacing: 2px;
  text-decoration: none;
}

.logo .highlight {
  color: var(--cyan-accent);
}

.nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav a {
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--primary-blue);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--dark-navy);
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  padding: 80px 0;
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--dark-navy);
}

.hero-title .accent {
  color: var(--cyan-accent);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-image {
  flex: 1;
  text-align: center;
}

.hero-image img {
  max-width: 400px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary-blue);
  color: var(--white);
}

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

.btn-secondary {
  background: transparent;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: var(--white);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.1rem;
}

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

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

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--white);
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.card-dark {
  background: var(--bg-dark);
  color: var(--white);
  border: none;
}

.card-dark h1,
.card-dark h2,
.card-dark h3 {
  color: var(--white);
}

/* Signup Box */
.signup-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
  max-width: 400px;
}

.signup-box h3 {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.signup-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Checkbox Preferences */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: var(--bg-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}

.checkbox-item:hover {
  background: #e3f2fd;
}

.checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary-blue);
  cursor: pointer;
}

.checkbox-label .title {
  font-weight: 600;
  color: var(--text-dark);
  display: block;
  margin-bottom: 4px;
}

.checkbox-label .description {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Backtest Form */
.backtest-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 30px;
}

.backtest-params {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 25px;
}

.backtest-params h3 {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-light);
}

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

.param-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.param-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.param-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.param-locked {
  position: relative;
}

.param-locked .param-input {
  background: #f5f5f5;
  color: var(--text-muted);
}

.param-locked::after {
  content: "🔒";
  position: absolute;
  right: 12px;
  top: 38px;
  font-size: 0.9rem;
}

.unlock-cta {
  background: linear-gradient(135deg, var(--cyan-accent), var(--primary-blue));
  color: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  margin-top: 20px;
}

.unlock-cta h4 {
  color: var(--white);
  margin-bottom: 10px;
}

.unlock-cta p {
  font-size: 0.9rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

/* Results Section */
.backtest-results {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 25px;
  border: 1px solid var(--border-light);
}

.results-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.results-placeholder .icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-light);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-navy);
}

.stat-value.positive {
  color: var(--success-green);
}

.stat-value.negative {
  color: var(--error-red);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Status Messages */
.status {
  padding: 15px;
  border-radius: var(--radius);
  margin-top: 20px;
  text-align: center;
  display: none;
}

.status.show {
  display: block;
}

.status.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.status.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.status.info {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

/* Footer */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border-light);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
}

.footer-brand h3 {
  margin-bottom: 10px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--dark-navy);
}

.data-table tbody tr:hover {
  background: #f5f5f5;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 40px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-image img {
    max-width: 250px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
  }

  .nav.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .backtest-container {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 30px;
  }
}
