/* Stock Analyzer Page Specific Styles */

main {
    background: linear-gradient(135deg, #fefefa 0%, #08662a 100%);
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Use global .container for width; add card styling only inside main */
main .container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    padding: 40px;
}

main h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

/* Scope inputs and buttons so they don't affect other forms */
.search-box input[type="text"] {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.search-box button {
    padding: 15px 30px;
    background: #1e2d42;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.search-box button:active {
    transform: translateY(0);
}

.search-box button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #667eea;
    font-weight: 600;
}

.error {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    padding: 15px;
    color: #c33;
    margin-top: 20px;
}

.results {
    margin-top: 30px;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.stock-name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.stock-symbol {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

.stock-price {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.metric-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    background: #f0f1f3;
}

.metric-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.recommendation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.recommendation-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.recommendation-value {
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.recommendation.buy {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.recommendation.hold {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.recommendation.sell {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.disclaimer {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 10px;
    font-size: 12px;
    color: #856404;
    text-align: center;
}

/* Override footer margin for stock page */
footer {
    margin-top: 0;
}

/* ===============================
   Mobile / Tablet Adjustments
   Anything under 800px wide
================================ */
@media (max-width: 800px) {

  main {
    padding: 20px 10px;
  }

  main .container {
    padding: 25px;
  }

  /* Search box stacks vertically */
  .search-box {
    flex-direction: column;
  }

  .search-box button {
    width: 100%;
  }

  /* Stock header stacks into a column */
  .stock-header {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* Price smaller on small screens */
  .stock-price {
    font-size: 26px;
  }

  /* Metrics grid becomes 1 column */
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  /* Recommendation card tighter on small screens */
  .recommendation-value {
    font-size: 26px;
  }
}

