/* Reset and base styles */
:root {
    /* Light theme colors */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #ec4899;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --bg-dark: #111827;
    --bg-light: #f3f4f6;
    --error-color: #ef4444;
    --success-color: #22c55e;
    --card-bg: #ffffff;
    --input-border: #e5e7eb;
    --input-bg: #ffffff;
  }
  
  [data-theme="dark"] {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f472b6;
    --text-color: #f3f4f6;
    --bg-color: #111827;
    --bg-dark: #030712;
    --bg-light: #1f2937;
    --card-bg: #1e293b;
    --input-border: #374151;
    --input-bg: #111827;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
  }
  
  /* Theme Toggle */
  .theme-toggle-wrapper {
    display: flex;
    align-items: center;
    margin-left: 1rem;
  }
  
  .theme-toggle {
    position: relative;
    width: 50px;
    height: 25px;
    appearance: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
  }
  
  .theme-toggle::before {
    content: '🌞';
    position: absolute;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: 0.3s;
  }
  
  .theme-toggle:checked::before {
    content: '🌙';
    transform: translateX(25px);
  }
  
  /* Navigation */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(var(--bg-color), 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }
  
  .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
  }
  
  .logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s ease infinite;
  }
  
  .nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
  }
  
  .nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
  }
  
  .nav-link:hover::after {
    width: 100%;
  }
  
  .menu-icon {
    display: none;
    cursor: pointer;
    z-index: 100;
  }
  
  .menu-icon .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: 0.4s;
  }
  
  .menu-icon.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .menu-icon.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .menu-icon.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  /* Header */
  .header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
    overflow: hidden;
  }
  
  .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80') center/cover;
    opacity: 0.1;
  }
  
  .header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
  }
  
  /* Sections */
  .section {
    padding: 80px 0;
  }
  
  .section-content {
    display: flex;
    align-items: center;
    gap: 4rem;
  }
  
  .section-content.reverse {
    flex-direction: row-reverse;
  }
  
  .text-content {
    flex: 1;
  }
  
  .text-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .image-content {
    flex: 1;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
  }
  
  .image-content:hover {
    transform: perspective(1000px) rotateY(0deg);
  }
  
  .image-content img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
  }
  
  .bg-light {
    background-color: var(--bg-light);
  }
  
  /* Buttons */
  .btn {
    border: none;
    padding: 0.8em 1.6em;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
  }
  
  .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
  }
  
  .btn:hover::before {
    width: 300px;
    height: 300px;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
  }
  
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }
  
  .btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
  }
  
  .spinner {
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
  }
  
  /* Footer */
  .footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 60px 0 20px;
  }
  
  .footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  .footer-section h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
  }
  
  .footer-section ul {
    list-style: none;
  }
  
  .footer-section ul li {
    margin-bottom: 0.5rem;
  }
  
  .footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  
  .footer-section a:hover {
    color: var(--secondary-color);
  }
  
  .footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Sign Up Page */
  .page {
    display: none;
    min-height: 100vh;
  }
  
  .page.active {
    display: block;
  }
  
  .signup-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-light), var(--bg-color));
  }
  
  .signup-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
  }
  
  .signup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  }
  
  .form-group {
    margin-bottom: 1.5rem;
    position: relative;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
  }
  
  .input-container {
    position: relative;
  }
  
  .input-container input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--text-color);
  }
  
  .input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  }
  
  .input-container input.error {
    border-color: var(--error-color);
  }
  
  .form-progress {
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    margin-bottom: 1rem;
    border-radius: 4px;
  }
  
  .tooltip {
    position: absolute;
    background: var(--bg-dark);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  
  .form-group:hover .tooltip {
    opacity: 1;
  }
  
  .error-message {
    background: var(--error-color);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    animation: slideIn 0.3s ease;
    position: relative;
  }
  
  .success-message {
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    animation: slideIn 0.3s ease;
    position: relative;
  }
  
  .success-message::before, .error-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .success-message:hover::before, .error-message:hover::before {
    opacity: 1;
  }
  
  .input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
  }
  
  .btn-block {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
  }
  
  .back-btn:hover {
    color: var(--primary-color);
  }
  
  .arrow-left::before {
    content: "←";
    margin-right: 0.5rem;
  }
  
  .saved-data {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--input-border);
  }
  
  .saved-data.hidden {
    display: none;
  }
  
  .saved-data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .clear-data-btn {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s ease;
  }
  
  .clear-data-btn:hover {
    opacity: 0.8;
  }
  
  /* Animations */
  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes gradient {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
  }
  
  .fade-in {
    animation: fadeIn 0.3s ease;
  }
  
  .fade-out {
    animation: fadeOut 0.3s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      height: 100vh;
      width: 80%;
      background: var(--bg-color);
      backdrop-filter: blur(10px);
      flex-direction: column;
      justify-content: center;
      align-items: center;
      transition: right 0.3s ease;
      box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
    }
  
    .nav-links.active {
      right: 0;
    }
  
    .menu-icon {
      display: block;
      touch-action: manipulation;
    }
  
    .section-content {
      flex-direction: column;
      gap: 2rem;
    }
  
    .section-content.reverse {
      flex-direction: column;
    }
  
    .footer-content {
      grid-template-columns: 1fr;
      text-align: center;
    }
  
    .header h1 {
      font-size: 2rem;
    }
  
    .text-content h2 {
      font-size: 1.8rem;
    }
  
    .image-content {
      transform: none;
      max-width: 100%;
    }
  
    .signup-card {
      padding: 1.5rem;
      margin: 1rem;
    }
  
    .btn {
      touch-action: manipulation;
    }
  
    .input-container input {
      font-size: 1rem;
      padding: 0.7rem;
    }
  }
