:root {
      --primary: #15c39a;
      --primary-dark: #0fa37d;
      --primary-light: #e0f7f2;
      --error: #ff4757;
      --error-light: #ffe5e8;
      --warning: #ffa502;
      --warning-light: #fff4e0;
      --info: #2ed573;
      --info-light: #e5f9ee;
      --clarity: #3742fa;
      --clarity-light: #e8e9ff;
      --engagement: #ff6b81;
      --engagement-light: #ffe5e9;
      --dark: #2d3436;
      --light: #f8f9fa;
      --gray: #adb5bd;
      --sidebar-width: 320px;
    }
    
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    body {
      font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
      line-height: 1.6;
      color: var(--dark);
      background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    
    /* Header & Navigation */
    header {
      background: white;
      box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
      position: sticky;
      top: 0;
      z-index: 100;
    }
    
    .navbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 15px 5%;
      max-width: 1400px;
      margin: 0 auto;
    }
    
    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--primary);
    }
    
    .logo i {
      font-size: 1.8rem;
    }
    
    .nav-links {
      display: flex;
      gap: 25px;
    }
    
    .nav-links a {
      text-decoration: none;
      color: var(--dark);
      font-weight: 500;
      transition: color 0.3s;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    
    .nav-links a:hover {
      color: var(--primary);
    }
    
    .nav-links a i {
      font-size: 0.9rem;
    }
    
    /* Main Content Layout */
    .main-container {
      display: flex;
      flex: 1;
      max-width: 1400px;
      margin: 0 auto;
      width: 100%;
      padding: 0 20px;
    }
    
    .content {
      flex: 1;
      padding: 30px 20px;
    }
    
    .sidebar {
      width: var(--sidebar-width);
      background: white;
      padding: 25px;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      margin: 30px 0;
      height: fit-content;
      position: sticky;
      top: 100px;
    }
    
    .sidebar-title {
      font-size: 1.3rem;
      margin-bottom: 20px;
      color: var(--primary);
      display: flex;
      align-items: center;
      gap: 10px;
      padding-bottom: 10px;
      border-bottom: 2px solid var(--primary-light);
    }
    
    .sidebar-title i {
      font-size: 1.2rem;
    }
    
    /* Product Cards */
    .product-card {
      background: var(--light);
      border-radius: 10px;
      padding: 20px;
      margin-bottom: 20px;
      transition: transform 0.3s, box-shadow 0.3s;
      border: 1px solid #e2e8f0;
    }
    
    .product-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .product-card h3 {
      font-size: 1.1rem;
      margin-bottom: 10px;
      color: var(--dark);
    }
    
    .product-card p {
      font-size: 0.9rem;
      color: var(--dark);
      opacity: 0.8;
      margin-bottom: 15px;
      line-height: 1.5;
    }
    
    .product-price {
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--primary);
      margin-bottom: 15px;
    }
    
    .product-features {
      list-style: none;
      margin-bottom: 15px;
    }
    
    .product-features li {
      padding: 5px 0;
      font-size: 0.85rem;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .product-features li i {
      color: var(--info);
      font-size: 0.7rem;
    }
    
    .btn-product {
      display: block;
      width: 100%;
      padding: 12px;
      background-color: var(--primary);
      color: white;
      text-align: center;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 600;
      transition: background-color 0.3s;
    }
    
    .btn-product:hover {
      background-color: var(--primary-dark);
    }
    
    /* Grammar Checker Styles */
    .container {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }
    
    .page-header {
      text-align: center;
      padding: 20px 0;
    }
    
    h1 {
      font-size: 2.2rem;
      margin-bottom: 8px;
      color: var(--primary);
    }
    
    .subtitle {
      font-size: 1.1rem;
      color: var(--dark);
      opacity: 0.8;
    }
    
    .card {
      background: white;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      padding: 24px;
      transition: transform 0.2s ease;
    }
    
    .card:hover {
      transform: translateY(-2px);
    }
    
    .card-title {
      font-size: 1.3rem;
      margin-bottom: 16px;
      color: var(--dark);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .card-title i {
      color: var(--primary);
    }
    
    .editor-container {
      position: relative;
      border: 2px solid #e2e8f0;
      border-radius: 8px;
      overflow: hidden;
    }
    
    textarea {
      width: 100%;
      min-height: 250px;
      padding: 20px;
      font-size: 1rem;
      border: none;
      resize: vertical;
      font-family: inherit;
      line-height: 1.6;
    }
    
    textarea:focus {
      outline: none;
    }
    
    .editor-toolbar {
      display: flex;
      padding: 10px 20px;
      background: var(--light);
      border-bottom: 1px solid #e2e8f0;
      gap: 10px;
    }
    
    .toolbar-btn {
      padding: 8px 12px;
      background: white;
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 0.9rem;
      transition: all 0.2s;
    }
    
    .toolbar-btn:hover {
      background: var(--primary-light);
      border-color: var(--primary);
    }
    
    .toolbar-btn.active {
      background: var(--primary);
      color: white;
      border-color: var(--primary);
    }
    
    .controls {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      align-items: center;
      margin: 16px 0;
    }
    
    select, input[type="checkbox"] {
      padding: 10px;
      border-radius: 8px;
      border: 2px solid #e2e8f0;
      font-family: inherit;
    }
    
    button {
      padding: 10px 20px;
      border-radius: 8px;
      border: none;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-primary:hover {
      background-color: var(--primary-dark);
    }
    
    .btn-secondary {
      background-color: var(--light);
      color: var(--dark);
      border: 1px solid var(--gray);
    }
    
    .btn-secondary:hover {
      background-color: #e9ecef;
    }
    
    .checkbox-container {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .results-container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
    }
    
    @media (max-width: 1100px) {
      .main-container {
        flex-direction: column;
      }
      
      .sidebar {
        width: 100%;
        position: static;
      }
      
      .results-container {
        grid-template-columns: 1fr;
      }
    }
    
    @media (max-width: 768px) {
      .navbar {
        flex-direction: column;
        gap: 15px;
      }
      
      .nav-links {
        flex-wrap: wrap;
        justify-content: center;
      }
      
      .editor-toolbar {
        flex-wrap: wrap;
      }
    }
    
    .highlighted-text {
      padding: 20px;
      border: 2px solid #e2e8f0;
      border-radius: 8px;
      min-height: 250px;
      white-space: pre-wrap;
      background-color: white;
      line-height: 1.8;
      position: relative;
    }
    
    .highlight {
      position: relative;
      cursor: pointer;
      padding: 1px 2px;
      border-radius: 3px;
    }
    
    .highlight.grammar {
      background-color: var(--error-light);
      border-bottom: 2px dashed var(--error);
    }
    
    .highlight.spelling {
      background-color: var(--warning-light);
      border-bottom: 2px dashed var(--warning);
    }
    
    .highlight.punctuation {
      background-color: var(--info-light);
      border-bottom: 2px dashed var(--info);
    }
    
    .highlight.style {
      background-color: var(--clarity-light);
      border-bottom: 2px dashed var(--clarity);
    }
    
    .highlight.engagement {
      background-color: var(--engagement-light);
      border-bottom: 2px dashed var(--engagement);
    }
    
    .matches-container {
      max-height: 500px;
      overflow-y: auto;
    }
    
    .match {
      margin: 12px 0;
      padding: 16px;
      border-radius: 8px;
      background-color: white;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      border-left: 4px solid var(--warning);
    }
    
    .match.grammar {
      border-left-color: var(--error);
    }
    
    .match.spelling {
      border-left-color: var(--warning);
    }
    
    .match.punctuation {
      border-left-color: var(--info);
    }
    
    .match.style {
      border-left-color: var(--clarity);
    }
    
    .match.engagement {
      border-left-color: var(--engagement);
    }
    
    .match-header {
      display: flex;
      justify-content: between;
      align-items: flex-start;
      margin-bottom: 8px;
    }
    
    .match-type {
      font-size: 0.75rem;
      padding: 4px 8px;
      border-radius: 20px;
      font-weight: 600;
      margin-right: 8px;
    }
    
    .type-grammar {
      background-color: var(--error-light);
      color: var(--error);
    }
    
    .type-spelling {
      background-color: var(--warning-light);
      color: #b58c10;
    }
    
    .type-punctuation {
      background-color: var(--info-light);
      color: var(--info);
    }
    
    .type-style {
      background-color: var(--clarity-light);
      color: var(--clarity);
    }
    
    .type-engagement {
      background-color: var(--engagement-light);
      color: var(--engagement);
    }
    
    .match-message {
      font-weight: 600;
      margin-bottom: 8px;
      flex: 1;
    }
    
    .match-context {
      color: var(--dark);
      opacity: 0.7;
      font-size: 0.9rem;
      margin-bottom: 12px;
    }
    
    .suggestions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 8px;
    }
    
    .suggestion {
      padding: 6px 12px;
      border-radius: 20px;
      background-color: var(--light);
      border: 1px solid var(--gray);
      cursor: pointer;
      font-size: 0.9rem;
      transition: all 0.2s;
    }
    
    .suggestion:hover {
      background-color: var(--primary-light);
      border-color: var(--primary);
      color: var(--primary);
    }
    
    .match-explanation {
      margin-top: 8px;
      font-size: 0.9rem;
      color: var(--dark);
      opacity: 0.8;
      padding-top: 8px;
      border-top: 1px solid #e2e8f0;
    }
    
    .stats {
      display: flex;
      gap: 16px;
      margin-top: 16px;
    }
    
    .stat {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 12px;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      min-width: 100px;
    }
    
    .stat-value {
      font-size: 1.8rem;
      font-weight: 700;
    }
    
    .stat-label {
      font-size: 0.8rem;
      color: var(--dark);
      opacity: 0.7;
    }
    
    .error-count {
      color: var(--error);
    }
    
    .word-count {
      color: var(--primary);
    }
    
    .score-count {
      color: var(--info);
    }
    
    .no-issues {
      text-align: center;
      padding: 40px 20px;
      color: var(--dark);
      opacity: 0.7;
    }
    
    .no-issues i {
      font-size: 3rem;
      margin-bottom: 16px;
      color: var(--info);
    }
    
    .writing-score {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 15px;
      margin: 20px 0;
      padding: 20px;
      background: white;
      border-radius: 12px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
    
    .score-circle {
      width: 100px;
      height: 100px;
      border-radius: 50%;
      background: conic-gradient(var(--primary) 0% 75%, #e2e8f0 75% 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }
    
    .score-inner {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      background: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      font-weight: 700;
      color: var(--primary);
    }
    
    .score-text {
      flex: 1;
    }
    
    .score-text h3 {
      font-size: 1.3rem;
      margin-bottom: 8px;
      color: var(--dark);
    }
    
    .score-text p {
      color: var(--dark);
      opacity: 0.8;
    }
    
    /* Footer */
    footer {
      background: var(--dark);
      color: white;
      padding: 40px 20px;
      margin-top: 50px;
    }
    
    .footer-content {
      max-width: 1400px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 40px;
    }
    
    .footer-section h3 {
      font-size: 1.3rem;
      margin-bottom: 20px;
      color: white;
    }
    
    .footer-section p, .footer-section a {
      color: #adb5bd;
      line-height: 1.8;
    }
    
    .footer-section a {
      text-decoration: none;
      transition: color 0.3s;
    }
    
    .footer-section a:hover {
      color: white;
    }
    
    .footer-links {
      list-style: none;
    }
    
    .footer-links li {
      margin-bottom: 10px;
    }
    
    .footer-bottom {
      text-align: center;
      padding-top: 30px;
      margin-top: 30px;
      border-top: 1px solid #444;
      color: #adb5bd;
    }
    
    .social-links {
      display: flex;
      gap: 15px;
      margin-top: 20px;
    }
    
    .social-links a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 50%;
      transition: background 0.3s;
    }
    
    .social-links a:hover {
      background: var(--primary);
    }