:root {
    --poetry-bg: #faf9f7;
    --poetry-text: #2c1810;
    --poetry-text-light: #5d4e37;
    --poetry-border: #d4c5a9;
    --poetry-accent: #8b4513;
    --poetry-accent-light: #deb887;
    --poetry-shadow: 0 4px 6px -1px rgba(139, 69, 19, 0.1);
    --poetry-shadow-lg: 0 10px 15px -3px rgba(139, 69, 19, 0.1);
  }
  
  [data-theme="dark"] {
    --poetry-bg: #1a1a1a;
    --poetry-text: #f5f5dc;
    --poetry-text-light: #d2b48c;
    --poetry-border: #4a4a4a;
    --poetry-accent: #deb887;
    --poetry-accent-light: #8b4513;
  }
  
  * {
    box-sizing: border-box;
  }
  
  body {
    font-family: "Noto Serif SC", "SimSun", "songti sc", serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: var(--poetry-bg);
    color: var(--poetry-text);
  }
  
  .font-serif {
    font-family: "Noto Serif SC", "SimSun", "songti sc", serif;
  }
  
  .font-kai {
    font-family: "Kaiti SC", "KaiTi", cursive;
  }
  
  .poem-content {
    font-family: "Kaiti SC", "KaiTi", cursive;
    line-height: 2.2;
    font-size: 1.25rem;
    color: var(--poetry-text);
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    text-align: center;
    letter-spacing: 0.1em;
  }
  
  .poem-content.vertical {
    writing-mode: vertical-rl;
    text-orientation: upright;
    height: 400px;
    overflow-x: auto;
    padding: 2rem;
  }
  
  .poem-meta {
    font-family: "Noto Serif SC", "SimSun", serif;
    color: var(--poetry-text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }
  
  .poem-title {
    font-family: "Kaiti SC", "KaiTi", cursive;
    font-size: 2.5rem;
    color: var(--poetry-accent);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 400;
  }
  
  .annotation-content {
    font-family: "Noto Serif SC", "SimSun", serif;
    line-height: 1.8;
    font-size: 1rem;
    color: var(--poetry-text);
  }
  
  .annotation-content h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--poetry-accent);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--poetry-border);
  }
  
  .annotation-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--poetry-accent);
    margin-top: 2rem;
    margin-bottom: 1rem;
    position: relative;
  }
  
  .annotation-content h2::before {
    content: "";
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(to bottom, var(--poetry-accent), var(--poetry-accent-light));
    border-radius: 2px;
  }
  
  .annotation-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--poetry-accent);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    border-left: 3px solid var(--poetry-accent);
    background: linear-gradient(to right, var(--poetry-accent-light), transparent);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .annotation-content p {
    margin-bottom: 1.25rem;
    text-indent: 2em;
    text-align: justify;
  }
  
  .annotation-content strong {
    font-weight: 600;
    color: var(--poetry-accent);
  }
  
  .reading-settings {
    position: sticky;
    top: 0;
    background: var(--poetry-bg);
    border-bottom: 1px solid var(--poetry-border);
    z-index: 10;
    padding: 1rem 0;
    margin: -2rem -2rem 2rem -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .card-hover {
    transition: box-shadow 0.3s ease, transform 0.2s ease;
  }
  
  .card-hover:hover {
    box-shadow: var(--poetry-shadow-lg);
    transform: translateY(-2px);
  }
  
  .fade-in {
    animation: fadeIn 0.5s ease-in;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 24rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--poetry-shadow-lg);
    border: 1px solid var(--poetry-border);
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  
  [data-theme="dark"] .notification {
    background: #2d3748;
    color: var(--poetry-text);
  }
  
  .notification.show {
    transform: translateX(0);
  }
  
  .notification-success {
    border-left: 4px solid #10b981;
  }
  
  .notification-error {
    border-left: 4px solid #ef4444;
  }
  
  .notification-info {
    border-left: 4px solid #3b82f6;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .btn:hover {
    transform: translateY(-1px);
  }
  
  .btn-primary {
    background-color: var(--poetry-accent);
    color: white;
  }
  
  .btn-primary:hover {
    background-color: #654321;
  }
  
  .error-message {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
  }
  
  [data-theme="dark"] .error-message {
    background-color: #7f1d1d;
    border-color: #dc2626;
    color: #fecaca;
  }
  
  .success-message {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
  }
  
  [data-theme="dark"] .success-message {
    background-color: #064e3b;
    border-color: #059669;
    color: #a7f3d0;
  }
  
  [data-theme="dark"] {
    background-color: var(--poetry-bg);
    color: var(--poetry-text);
  }
  
  [data-theme="dark"] .bg-white {
    background-color: #2d3748 !important;
    color: var(--poetry-text) !important;
  }
  
  [data-theme="dark"] .bg-gray-50 {
    background-color: #1a202c !important;
  }
  
  [data-theme="dark"] .text-gray-900 {
    color: var(--poetry-text) !important;
  }
  
  [data-theme="dark"] .text-gray-800 {
    color: var(--poetry-text) !important;
  }
  
  [data-theme="dark"] .text-gray-700 {
    color: var(--poetry-text-light) !important;
  }
  
  [data-theme="dark"] .text-gray-600 {
    color: var(--poetry-text-light) !important;
  }
  
  [data-theme="dark"] .border-gray-200 {
    border-color: var(--poetry-border) !important;
  }
  
  [data-theme="dark"] .border-gray-300 {
    border-color: var(--poetry-border) !important;
  }
  
  [data-theme="dark"] input,
  [data-theme="dark"] textarea {
    background-color: #2d3748 !important;
    color: var(--poetry-text) !important;
    border-color: var(--poetry-border) !important;
  }
  
  @media (max-width: 768px) {
    .poem-content {
      font-size: 1.1rem;
      line-height: 2;
    }
  
    .poem-content.vertical {
      height: 300px;
      padding: 1rem;
    }
  
    .poem-title {
      font-size: 2rem;
    }
  
    .reading-settings {
      position: relative;
      margin: 0 0 1.5rem 0;
      padding: 1rem;
      border-radius: 0.5rem;
      background: #f7fafc;
      border: 1px solid var(--poetry-border);
    }
  
    .annotation-content {
      font-size: 0.9rem;
    }
  }
  
  @media (max-width: 640px) {
    .poem-content {
      font-size: 1rem;
    }
  
    .poem-title {
      font-size: 1.75rem;
    }
  }


  [data-theme="dark"] #readingControls button {
    background: #2d3748;
  }