* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  :root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
  }
  
  html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--surface);
    color: var(--text-primary);
  }
  
  body {
    display: flex;
    overflow-y: auto; /* Changed from overflow: hidden */
  }
  
  .sidebar {
    width: 300px;
    background-color: var(--surface);
    padding: 32px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1000;
  }
  
  .logo {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .logo-icon {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
  }
  .logo-icon a {
    color: white;
    text-decoration: none;
  }
  
  .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .sidebar p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .gpt-links {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .gpt-links a {
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--surface-hover);
    transition: background-color 0.2s ease;
  }
  
  .gpt-links a:hover,
  .gpt-links a.active {
    background-color: var(--primary);
    color: white;
  }
  
  .main {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Changed from overflow: hidden */
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
  }
  
  .options-header {
    max-width: 800px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease-out;
  }
  
  .options-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .options-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
  }
  
  .options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin-bottom: 48px;
    padding:10px 0 0 0;
  }
  
  .option-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    animation: fadeIn 0.6s ease-out;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
  }
  
  .option-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  }
  
  .card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
  }
  
  .option-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
  }
  
  .option-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
  }
  
  .option-card button {
    border: 2px solid var(--primary);
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    background-color: var(--primary);
    color: white;
  }
  
  .option-card button:hover {
    transform: translateY(-2px);
    background-color: var(--surface);
    color: var(--primary);
  }
  
  .option-card button::after {
    content: "→";
    transition: transform 0.2s ease;
  }
  
  .option-card button:hover::after {
    transform: translateX(4px);
  }

  .card-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
  }

  .question-box {
    max-width: 1200px;
    background: var(--surface);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--border);
    animation: fadeIn 0.6s ease-out;
  }

  .question-box h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var (--text-primary);
  }

  .question-box textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 16px;
  }

  .question-box button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
  }

  .question-box button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
  }

  .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* Mobile Header */
  .mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 1001;
  }

  .menu-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: none;
  }

  .menu-button span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
  }

  /* Overlay when mobile menu is open */
  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .overlay.active {
    display: block;
  }

  .chat-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background-color: var(--surface);
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .chat-header::before {
    content: "🤖";
    font-size: 1.5rem;
  }
  
  .chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    padding-bottom: calc(120px + 32px); /* Updated to match new input container height */
    display: flex;
    flex-direction: column;
  }
  
  .message {
    max-width: 85%;
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 1rem;
    animation: fadeIn 0.3s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  
  .message.bot {
    background-color: var(--surface);
    border: 1px solid var(--border);
    margin-right: auto;
    position: relative; /* Add this */
  }
  
  .message.user {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    margin-left: auto;
    border: none;
  }
  
  .message strong {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
  }
  
  .chat-input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px; /* Increased from 88px */
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    gap: 16px;
    align-items: center;
  }
  
  #user-input {
    flex: 1;
    height: 72px; /* Increased from 40px */
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    resize: none;
    overflow-y: auto; /* Enable vertical scrolling */
    line-height: 1.5;
  }
  
  #user-input:focus {
    outline: none;
    border-color: var (--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  }
  
  .send-btn {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  }
  
  .send-btn::after {
    transition: transform 0.2s ease;
  }
  
  .send-btn:hover::after {
    transform: translateX(4px);
  }

  .message-dropdown {
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--surface);
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 160px;
  }
  
  .message-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  }
  
  .message pre {
    background-color: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
  }
  
  .message code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
  }
  
  .message p {
    margin-bottom: 8px;
    white-space: pre-line; /* Add this to preserve line breaks */
  }
  
  .message p:last-child {
    margin-bottom: 0;
  }

  .message ul {
    margin: 12px 0;
    padding-left: 24px;
    list-style: none;
  }

  .message ol {
    margin: 12px 0;
    padding-left: 24px;
  }

  .message li {
    margin: 8px 0;
    position: relative;
    padding-left: 8px;
  }

  .message ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: -16px;
  }

  .message ol li {
  }

  .message ol li::before {
    color: var(--primary);
    font-weight: 600;
    position: absolute;
    left: -24px;
  }

  /* Add new styles for copy button */
  .copy-button {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
  }

  .message.bot:hover .copy-button {
    opacity: 1;
  }

  .copy-button:hover {
    background-color: var(--border);
  }

  .copy-button svg {
    width: 16px;
    height: 16px;
    fill: var(--text-secondary);
  }

  .copy-button.copied {
    background-color: var(--primary);
  }

  .copy-button.copied svg {
    fill: white;
  }

  .message .preferences {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.9rem;
  }

  .message .preference-tag {
    background: rgba(255, 255, 255, 0.5);
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-weight: 500;
  }

  .message .bot-tone {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
  }

  @media (max-width: 768px) {
    body {
      flex-direction: column;
    }

    .mobile-header {
      display: flex;
    }

    .menu-button {
      display: block;
    }
    
    .sidebar {
      position: fixed;
      top: 64px;
      left: -300px;
      height: calc(100% - 64px);
      transition: left 0.3s ease;
      background-color: var(--surface);
    }

    .sidebar.active {
      left: 0;
    }
    
    .main {
      height: calc(100vh - 64px); /* Adjust for mobile header */
      padding: 15px 15px;
      margin-top: 64px;
    }

    .options-header h1 {
      font-size: 2rem;
    }
    
    .options-container {
      grid-template-columns: 1fr;
    }

    /* Menu button animation when active */
    .menu-button.active span:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-button.active span:nth-child(2) {
      opacity: 0;
    }

    .menu-button.active span:nth-child(3) {
      transform: rotate(-45deg) translate(7px, -7px);
    }

    .desktop-logo {
      display: none;
    }

    
      
    .chat-header {
        padding: 12px;
        font-size:18px;
      }
      
      .chat-container {
        padding: 20px 0;
        padding-bottom: calc(88px + 32px); /* Keep original padding on mobile */
      }
      
      .chat-input-container {
        padding: 15px;
        height: auto;
        display: block;
      }

      .message-dropdown {
        float:left;
        width:48.5%;
        box-sizing: border-box;
        margin:0 0 12px 0;
      }
      #tone-select {
        margin-right:3%;
      }

      .send-btn {
        float:left;
        width:20%;
        display: block;
        text-align: center;
        padding:14px 0;
        height:80px;
      }
      
      #user-input {
        height: 80px;
        float:left;
        width:77%;
        margin:0 3% 0 0;
      }
      
      .message {
        max-width: 95%;
      }
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .footer {
    padding: 32px;
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    text-align: center;
    box-sizing: border-box;
    float: left;
    width: 100%;
  }

  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
  }

  .footer-links {
    display: flex;
    gap: 24px;
  }

  .footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
  }

  .footer a:hover {
    color: var(--primary);
  }

  .social-links {
    display: flex;
    gap: 16px;
    align-items: center;
  }

  .footer svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: fill 0.2s ease;
  }

  .social-links a:hover svg {
    fill: var(--primary);
  }

  @media (max-width: 768px) {
    .footer-content {
      flex-direction: column;
      text-align: center;
    }
    
    .footer-links {
      flex-direction: column;
      gap: 16px;
    }
  }