   * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      --bg: #f5f7fa;
      --card-bg: #ffffff;
      --text: #2d3748;
      --text-light: #718096;
      --border: #e2e8f0;
      --primary: #4299e1;
      --primary-hover: #3182ce;
      --success: #48bb78;
      --success-hover: #38a169;
      --danger: #f56565;
      --danger-hover: #e53e3e;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
      --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    [data-theme="dark"] {
      --bg: #1a202c;
      --card-bg: #2d3748;
      --text: #e2e8f0;
      --text-light: #a0aec0;
      --border: #4a5568;
      --primary: #63b3ed;
      --primary-hover: #4299e1;
      --success: #68d391;
      --success-hover: #48bb78;
      --danger: #fc8181;
      --danger-hover: #f56565;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
      --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    }

    body {
      font-family: 'Inter', system-ui, sans-serif;
      background: var(--bg);
      color: var(--text);
      transition: all 0.3s;
      min-height: 100vh;
      padding: 2rem 1rem;
    }

    .container {
      max-width: 600px;
      margin: 0 auto;
    }

    .header {
      text-align: center;
      margin-bottom: 2rem;
    }

    .header h1 {
      font-size: 2rem;
      color: var(--primary);
      margin-bottom: 0.5rem;
    }

    .header p {
      color: var(--text-light);
    }

    .theme-toggle {
      position: fixed;
      top: 1rem;
      right: 1rem;
      background: var(--card-bg);
      border: 1px solid var(--border);
      padding: 0.5rem 1rem;
      border-radius: 8px;
      cursor: pointer;
      font-size: 1.2rem;
      box-shadow: var(--shadow);
      transition: transform 0.2s;
    }

    .theme-toggle:hover {
      transform: scale(1.05);
    }

    .todo-card {
      background: var(--card-bg);
      border-radius: 12px;
      padding: 2rem;
      box-shadow: var(--shadow-lg);
      border: 1px solid var(--border);
    }

    .input-section {
      display: flex;
      gap: 0.75rem;
      margin-bottom: 1.5rem;
    }

    #todo-input {
      flex: 1;
      padding: 0.875rem 1rem;
      border: 2px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
      font-size: 1rem;
      transition: border-color 0.3s;
    }

    #todo-input:focus {
      outline: none;
      border-color: var(--primary);
    }

    #add-btn {
      padding: 0.875rem 1.5rem;
      background: var(--success);
      color: white;
      border: none;
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.3s;
      font-size: 1rem;
    }

    #add-btn:hover {
      background: var(--success-hover);
    }

    .stats {
      display: flex;
      justify-content: space-between;
      padding: 1rem;
      background: var(--bg);
      border-radius: 8px;
      margin-bottom: 1rem;
      font-size: 0.875rem;
      color: var(--text-light);
    }

    #todo-list {
      list-style: none;
      padding: 0;
    }

    .todo-item {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 1rem;
      margin-bottom: 0.75rem;
      display: flex;
      align-items: center;
      gap: 1rem;
      transition: all 0.3s;
    }

    .todo-item:hover {
      box-shadow: var(--shadow);
      transform: translateY(-2px);
    }

    .todo-checkbox {
      width: 20px;
      height: 20px;
      cursor: pointer;
    }

    .todo-text {
      flex: 1;
      font-size: 1rem;
      color: var(--text);
      word-break: break-word;
    }

    .todo-text.completed {
      text-decoration: line-through;
      color: var(--text-light);
      opacity: 0.6;
    }

    .todo-actions {
      display: flex;
      gap: 0.5rem;
    }

    .btn {
      padding: 0.5rem 0.75rem;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.875rem;
      font-weight: 500;
      transition: all 0.3s;
    }

    .btn-edit {
      background: var(--primary);
      color: white;
    }

    .btn-edit:hover {
      background: var(--primary-hover);
    }

    .btn-delete {
      background: var(--danger);
      color: white;
    }

    .btn-delete:hover {
      background: var(--danger-hover);
    }

    .empty-state {
      text-align: center;
      padding: 3rem 1rem;
      color: var(--text-light);
    }

    .empty-state-icon {
      font-size: 3rem;
      margin-bottom: 1rem;
      opacity: 0.5;
    }

    /* Modal */
    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    .modal-overlay.active {
      display: flex;
    }

    .modal {
      background: var(--card-bg);
      border-radius: 12px;
      padding: 2rem;
      max-width: 500px;
      width: 100%;
      box-shadow: var(--shadow-lg);
      animation: slideUp 0.3s ease;
    }

    .modal h2 {
      margin-bottom: 1rem;
      color: var(--text);
    }

    .modal-input {
      width: 100%;
      padding: 0.875rem 1rem;
      border: 2px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
      font-size: 1rem;
      margin-bottom: 1.5rem;
    }

    .modal-input:focus {
      outline: none;
      border-color: var(--primary);
    }

    .modal-actions {
      display: flex;
      gap: 0.75rem;
      justify-content: flex-end;
    }

    .btn-cancel {
      background: var(--border);
      color: var(--text);
    }

    .btn-cancel:hover {
      background: var(--text-light);
    }

    .btn-save {
      background: var(--success);
      color: white;
    }

    .btn-save:hover {
      background: var(--success-hover);
    }

    @media (max-width: 640px) {
      .header h1 {
        font-size: 1.5rem;
      }

      .input-section {
        flex-direction: column;
      }

      .todo-actions {
        flex-direction: column;
      }
    }