﻿/* ==========================================================================
   AI Stock Prediction Landing Page Styles - Refactored
   Author: Galaxy (https://t.me/FB_GG_AD)
   Version: 3.0 - Complete Refactor
   ========================================================================== */

/* CSS Custom Properties for maintainability */
:root {
  /* Color Palette */
  --primary-blue: #1ec6e6;
  --primary-orange: #ffa200;
  --secondary-blue: #25a4e9;
  --success-green: #15a223;
  
  /* Background Colors */
  --bg-gradient-start: #0f1535;
  --bg-gradient-end: #1ec6e6;
  --card-bg: rgba(20, 30, 60, 0.95);
  --modal-bg: rgba(5, 16, 26, 1);
  --input-bg: #232b45;
  
  /* Text Colors */
  --text-white: #fff;
  --text-light: #b8c6e0;
  --text-accent: #3eeaff;
  
  /* Spacing */
  --container-max-width: 400px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 18px;
  --border-radius-xl: 24px;
  
  /* Typography */
  --font-family-primary: "Segoe UI", Arial, sans-serif;
  --font-size-base: 1rem;
  --font-size-lg: 1.1rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  
  /* Animation Duration */
  --animation-duration-fast: 0.2s;
  --animation-duration-medium: 1.6s;
  --animation-duration-slow: 2.2s;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-family-primary);
  background: linear-gradient(135deg, var(--bg-gradient-start) 60%, var(--bg-gradient-end) 100%);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 32px 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 20px 18px;
  margin-bottom: 24px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero__robot {
  width: 160px;
  height: 160px;
  margin-bottom: 16px;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__robot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: ai-float var(--animation-duration-slow) ease-in-out infinite alternate;
}

.hero__title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-orange);
  text-align: left;
  width: 100%;
}

.hero__subtitle {
  font-size: var(--font-size-xl);
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--text-white);
  text-align: left;
  width: 100%;
  line-height: 1.2;
}

/* ==========================================================================
   Statistics Section
   ========================================================================== */

.stats__accuracy {
  font-size: var(--font-size-lg);
  margin-bottom: 10px;
  color: var(--text-white);
}

.stats__percent {
  color: var(--primary-orange);
  font-weight: bold;
  font-size: 1.3rem;
}

.stats__description {
  font-size: var(--font-size-base);
  color: var(--text-light);
  margin-bottom: 6px;
}

.stats__highlight {
  color: var(--primary-orange);
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

/* ==========================================================================
   Form Components
   ========================================================================== */

.form {
  width: 100%;
  margin-bottom: 18px;
}

.form__input {
  width: 100%;
  padding: 14px 12px;
  border-radius: var(--border-radius-sm);
  border: none;
  background: var(--input-bg);
  color: var(--text-light);
  font-size: var(--font-size-base);
  outline: none;
  margin-bottom: 0;
  transition: background-color var(--animation-duration-fast) ease;
}

.form__input:focus {
  background: #2a3654;
  box-shadow: 0 0 0 2px var(--primary-blue);
}

.form__input::placeholder {
  color: var(--text-light);
  opacity: 0.7;
}

/* ==========================================================================
   Button Components
   ========================================================================== */

.btn {
  width: 100%;
  padding: 14px 0;
  border: none;
  border-radius: var(--border-radius-xl);
  color: var(--text-white);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--animation-duration-fast) ease;
  margin-top: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn--primary {
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  box-shadow: 0 2px 8px rgba(30, 198, 230, 0.18);
  animation: btn-breath 1.8s ease-in-out infinite;
}

.btn--success {
  background: var(--success-green);
  animation: breath var(--animation-duration-medium) ease-in-out infinite;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30, 198, 230, 0.25);
}

/* ==========================================================================
   Modal Components - Enhanced
   ========================================================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}

.modal--visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal__content {
  position: relative;
  background: var(--modal-bg);
  border-radius: var(--border-radius-md);
  padding: 32px 18px;
  max-width: 340px;
  margin: 60px auto;
  color: var(--text-white);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  max-height: 80vh;
  overflow-y: auto;
}

.modal__header {
  margin-bottom: 18px;
}

.modal__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  font-weight: bold;
}

.modal__title-icon {
  font-size: 24px;
}

.modal__footer {
  margin-top: 18px;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color var(--animation-duration-fast) ease;
}

.modal__close:hover,
.modal__close:focus {
  color: var(--text-white);
  outline: none;
}

/* ==========================================================================
   Button Components - Enhanced
   ========================================================================== */

.btn {
  width: 100%;
  padding: 14px 0;
  border: none;
  border-radius: var(--border-radius-xl);
  color: var(--text-white);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--animation-duration-fast) ease;
  margin-top: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  box-shadow: 0 2px 8px rgba(30, 198, 230, 0.18);
  animation: btn-breath 1.8s ease-in-out infinite;
}

.btn--success {
  background: var(--success-green);
  animation: breath var(--animation-duration-medium) ease-in-out infinite;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30, 198, 230, 0.25);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  animation: none;
}

.btn__icon {
  font-size: 18px;
}

.btn__text {
  flex: 1;
}

.btn__loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ==========================================================================
   Form Components - Enhanced
   ========================================================================== */

.form {
  width: 100%;
  margin-bottom: 18px;
}

.form__group {
  width: 100%;
  margin-bottom: 18px;
  position: relative;
}

.form__input {
  width: 100%;
  padding: 14px 12px;
  border-radius: var(--border-radius-sm);
  border: 2px solid transparent;
  background: var(--input-bg);
  color: var(--text-light);
  font-size: var(--font-size-base);
  outline: none;
  margin-bottom: 0;
  transition: all var(--animation-duration-fast) ease;
}

.form__input:focus {
  background: #2a3654;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(30, 198, 230, 0.2);
}

.form__input:invalid {
  border-color: #e74c3c;
}

.form__input::placeholder {
  color: var(--text-light);
  opacity: 0.7;
}

/* ==========================================================================
   Footer Components - Enhanced
   ========================================================================== */

.footer {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 32px auto 0;
  padding: 0 16px 24px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-light);
}

.footer__disclaimer {
  margin-bottom: 8px;
  font-weight: 500;
}

.footer__nav {
  margin-bottom: 8px;
}

.footer__link {
  color: var(--text-accent);
  text-decoration: underline;
  margin: 0 8px;
  transition: color var(--animation-duration-fast) ease;
}

.footer__link:hover {
  color: var(--primary-blue);
}

.footer__copyright {
  margin-top: 8px;
  opacity: 0.8;
}

/* ==========================================================================
   Cookie Banner - Enhanced
   ========================================================================== */

.cookie-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(20, 30, 60, 0.98);
  color: var(--text-white);
  padding: 14px 12px;
  font-size: 0.98rem;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(10px);
}

.cookie-banner__content {
  flex: 1;
  margin-right: 16px;
}

.cookie-banner__text {
  margin: 0;
  line-height: 1.4;
}

.cookie-banner__actions {
  display: flex;
  gap: 8px;
}

.cookie-banner__button {
  padding: 8px 18px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--text-accent) 100%);
  color: var(--text-white);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--animation-duration-fast) ease;
  white-space: nowrap;
}

.cookie-banner__button:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   Progress Components - Enhanced
   ========================================================================== */

.progress-container {
  margin-bottom: 16px;
}

.progress {
  margin-bottom: 16px;
}

.progress:last-child {
  margin-bottom: 0;
}

.progress__title {
  font-size: 15px;
  margin-bottom: 8px;
  font-weight: 500;
}

.progress__bar-container {
  background: #eee;
  border-radius: var(--border-radius-sm);
  height: 16px;
  overflow: hidden;
  position: relative;
}

.progress__bar {
  width: 0%;
  background: linear-gradient(90deg, #00dcf4 0%, #0fb8db 100%);
  height: 100%;
  border-radius: var(--border-radius-sm);
  transition: width 0.3s ease;
  position: relative;
}

.progress__bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes ai-float {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 2px 8px #ffa20044);
  }
  50% {
    transform: translateY(-12px) scale(1.04);
    filter: drop-shadow(0 8px 18px #ffa20066);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 2px 8px #ffa20044);
  }
}

@keyframes btn-breath {
  0% {
    box-shadow: 0 2px 16px 0 rgba(30, 198, 230, 0.25), 0 2px 8px rgba(30, 198, 230, 0.18);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 32px 0 rgba(30, 198, 230, 0.38), 0 2px 16px rgba(30, 198, 230, 0.22);
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 2px 16px 0 rgba(30, 198, 230, 0.25), 0 2px 8px rgba(30, 198, 230, 0.18);
    transform: scale(1);
  }
}

@keyframes breath {
  0% {
    box-shadow: 0 2px 12px 0 #15a22333;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 24px 0 #15a22355;
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 2px 12px 0 #15a22333;
    transform: scale(1);
  }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 480px) {
  .container {
    padding: 18px 4px 0;
  }

  .hero__robot {
    width: 120px;
    height: 120px;
  }

  .hero__title {
    font-size: var(--font-size-2xl);
    text-align: center;
    margin-bottom: 0;
  }

  .hero__subtitle {
    font-size: var(--font-size-lg);
    text-align: center;
  }

  .modal__content {
    margin: 40px auto;
    padding: 24px 16px;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 12px 8px 0;
  }

  .hero__title {
    font-size: 1.8rem;
  }

  .hero__subtitle {
    font-size: 1.2rem;
  }

  .card {
    padding: 16px 14px;
  }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.sr-only {
  /* position: absolute; */
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
