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

    body {
      min-height: 100vh;
      background: #fff;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      font-size: 18px;
    }

    /* App layout */
    .app-layout {
      display: flex;
      min-height: 100vh;
    }

    /* Sidebar */
    .sidebar {
      width: 220px;
      min-width: 220px;
      border-right: 1px solid #eee;
      padding: 24px 16px;
      overflow-y: auto;
    }

    .sidebar h1 {
      font-size: 20px;
      font-weight: 700;
      color: #333;
      margin-bottom: 24px;
    }

    .sidebar .subject-list {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .subject-btn {
      width: 100%;
      text-align: left;
      padding: 10px 12px;
      border: none;
      border-radius: 8px;
      background: transparent;
      font-size: 14px;
      font-weight: 500;
      color: #555;
      cursor: pointer;
      font-family: inherit;
      transition: background 0.2s, color 0.2s;
    }

    .subject-btn:hover {
      background: #f5f5f5;
      color: #333;
    }

    .subject-btn.active {
      background: #333;
      color: #fff;
    }

    .carousel {
      flex: 1;
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
      background: #fff;
    }

    /* Ad banners */
    .ad-banner {
      background: #f5f5f5;
      border: 1px dashed #ccc;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .ad-banner a {
      display: flex;
      width: 100%;
      height: 100%;
    }

    .ad-banner img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 8px;
    }

    .ad-label {
      font-size: 11px;
      color: #bbb;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .ad-banner-bottom {
      height: 188px;
      margin-top: 16px;
    }

    .image-container {
      position: relative;
      width: 100%;
      aspect-ratio: 16 / 10;
      overflow: hidden;
      background: #f5f5f5;
      border-radius: 12px;
    }

    .slide {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.4s ease, transform 0.4s ease;
      transform: scale(0.95);
    }

    .slide.active {
      opacity: 1;
      transform: scale(1);
    }

    .slide img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .counter {
      position: absolute;
      top: 14px;
      right: 14px;
      background: rgba(0, 0, 0, 0.4);
      color: #fff;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 13px;
      backdrop-filter: blur(4px);
    }

    .controls {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 16px;
      padding: 20px 0 8px;
    }

    .btn {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.15s ease, background 0.2s;
    }

    .btn:active {
      transform: scale(0.9);
    }

    .btn-arrow {
      background: #f5f5f5;
    }

    .btn-arrow:hover {
      background: #eaeaea;
    }

    .btn-arrow svg {
      width: 22px;
      height: 22px;
      fill: none;
      stroke: #333;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .btn-heart {
      position: absolute;
      top: 14px;
      left: 14px;
      z-index: 2;
      width: 40px;
      height: 40px;
      border: none;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.4);
      backdrop-filter: blur(4px);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.15s ease, background 0.2s;
    }

    .btn-heart:hover {
      background: rgba(0, 0, 0, 0.55);
    }

    .btn-heart:active {
      transform: scale(0.9);
    }

    .btn-heart svg {
      width: 20px;
      height: 20px;
      fill: none;
      stroke: #fff;
      stroke-width: 1.5;
      transition: transform 0.2s ease, fill 0.2s, stroke 0.2s;
    }

    .btn-heart.liked svg {
      fill: #e94560;
      stroke: #e94560;
      animation: heartPop 0.4s ease;
    }

    @keyframes heartPop {
      0% { transform: scale(1); }
      40% { transform: scale(1.3); }
      100% { transform: scale(1); }
    }

    .liked-badge {
      position: absolute;
      bottom: 14px;
      left: 14px;
      background: rgba(233, 69, 96, 0.85);
      color: white;
      padding: 5px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      opacity: 0;
      transition: opacity 0.3s;
      backdrop-filter: blur(4px);
    }

    .liked-badge.show {
      opacity: 1;
    }

    .spinner {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .spinner::after {
      content: "";
      width: 32px;
      height: 32px;
      border: 3px solid #e0e0e0;
      border-top-color: #999;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }

    .slide.loaded .spinner {
      display: none;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* Question panel below image */
    .question-panel {
      text-align: center;
      padding: 20px 0 0;
    }

    .question-panel .question-text {
      font-size: 24px;
      font-weight: 700;
      color: #333;
      line-height: 1.5;
    }

    .answer-buttons {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 12px;
    }

    .answer-btn {
      padding: 12px 24px;
      border: 2px solid #eee;
      border-radius: 28px;
      background: #fff;
      font-size: 18px;
      font-weight: 500;
      color: #555;
      cursor: pointer;
      font-family: inherit;
      transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
    }

    .answer-btn:hover {
      border-color: #ccc;
      color: #333;
    }

    .answer-btn:active {
      transform: scale(0.95);
    }

    .answer-btn.selected {
      border-color: #333;
      background: #333;
      color: #fff;
    }

    .answer-btn.not-selected {
      opacity: 0.4;
    }

    .answer-submit {
      width: 100%;
      padding: 12px 32px;
      border: none;
      border-radius: 28px;
      background: #333;
      font-size: 15px;
      font-weight: 600;
      color: #fff;
      cursor: pointer;
      font-family: inherit;
      transition: opacity 0.2s, transform 0.15s;
    }

    .answer-submit:disabled {
      opacity: 0.3;
      cursor: not-allowed;
    }

    .answer-submit:hover {
      background: #222;
    }

    .answer-submit:active {
      transform: scale(0.95);
    }

    .liked-count {
      text-align: center;
      padding: 8px 0 0;
      min-height: 32px;
    }

    .liked-count button {
      background: none;
      border: none;
      color: #999;
      font-size: 13px;
      cursor: pointer;
      font-family: inherit;
      padding: 4px 8px;
      transition: color 0.2s;
    }

    .liked-count button:hover {
      color: #e94560;
    }

    .liked-count button .count {
      font-weight: 600;
    }

    /* Favorites gallery overlay */
    .favorites {
      position: fixed;
      inset: 0;
      background: #fff;
      z-index: 100;
      overflow-y: auto;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }

    .favorites.open {
      opacity: 1;
      pointer-events: auto;
    }

    .favorites-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 24px 32px;
      position: sticky;
      top: 0;
      background: #fff;
      z-index: 1;
    }

    .favorites-header h2 {
      font-size: 18px;
      font-weight: 600;
      color: #333;
    }

    .favorites-header button {
      background: #f5f5f5;
      border: none;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }

    .favorites-header button:hover {
      background: #eaeaea;
    }

    .favorites-header button svg {
      width: 18px;
      height: 18px;
      stroke: #333;
      stroke-width: 2;
      fill: none;
      stroke-linecap: round;
    }

    .favorites-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 12px;
      padding: 0 32px 32px;
    }

    .favorites-grid .fav-item {
      aspect-ratio: 16 / 10;
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      position: relative;
      background: #f5f5f5;
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .favorites-grid .fav-item:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    }

    .favorites-grid .fav-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .favorites-grid .fav-label {
      position: absolute;
      bottom: 8px;
      left: 8px;
      background: rgba(0,0,0,0.4);
      color: #fff;
      padding: 3px 10px;
      border-radius: 12px;
      font-size: 12px;
      backdrop-filter: blur(4px);
    }

    .favorites-empty {
      text-align: center;
      padding: 80px 32px;
      color: #aaa;
      font-size: 15px;
    }
