.mobile-container {
  .topics {
    .mobile-header {
      margin-bottom: 0.5rem;
      background-color: #fff;
      border-bottom: 1px solid #e9ecef;
      display: flex;
      align-items: flex-start;
      gap: 1rem;

      .builder-logo-container {
        width: 80px;
        height: 60px;
        flex-shrink: 0;

        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
          object-position: center;
        }
      }

      .mobile-header-content {
        flex-grow: 1;
                  .page-header-title {
          font-size: 1.5em;
          font-weight: 600;
          color: #333;
          margin-bottom: 0.5rem;
          display: flex;
          align-items: center;
          gap: 0.5em;

        }
      }
    }

    .mobile-instructions {
      padding: 0.5rem;
      margin-bottom: 1rem;
      background-color: #f8f9fa;
      border-radius: 0.5rem;

      ul {
        list-style: none;
        padding: 0;
        margin: 0;

        li {
          margin-bottom: 0.5rem;
          font-size: 0.9rem;

          &:last-child {
            margin-bottom: 0;
          }
        }
      }
    }

    .section-title {
      font-size: 1.2rem;
      font-weight: 600;
      margin-top: 0.8rem;
      margin-bottom: 0.5rem;
      margin-left: 0.25rem;
      margin-right: 0.5rem;
      padding-left: 0rem !important;
    }

    .topic-list-item {
      padding: 0.5rem 0.75rem;
      margin-bottom: 0.5rem;
      background-color: #fff;
      border: 2px solid #e9ecef;
      border-radius: 0.5rem;

      /* Reduce padding for non-interactive topics */
      &:not(:has(.vote-row, .payment-row)) {
        padding: 0.25rem 0.75rem;
      }

      .topic-header-row {
        margin-bottom: 0.25rem;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;

        .topic-name {
          margin-bottom: 0;
          font-size: 1rem;
          font-weight: 500;
          flex: 1;
          min-width: 0;
          word-wrap: break-word;

          a {
            color: var(--primary-orange);
            text-decoration: none;
            display: inline;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
          }

          .topic-link {
            display: block;
            color: #666;
            margin-top: 0.25rem;
            margin-bottom: 0.25rem;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;

            a {
              color: var(--secondary-orange);
              text-decoration: none;
              font-weight: 500;
              font-size: 0.8em;
              display: inline-block;
              max-width: 100%;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
            }
          }
        }

        /* Non-interactive topics */
        .topic-list-item:not(:has(.vote-row, .payment-row)) & {
          .topic-name a {
            color: #333;
          }
          .topic-link {
            margin-bottom: 0;
          }
          .topic-link a {
            color: var(--secondary-orange);
          }
        }
      }

      .vote-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.25rem;
        font-size: 0.9rem;

        .vote-count {
          font-weight: 600;
          font-size: 1.3em;
        }

        .vote-count-label {
          font-size: 1.2rem;
        }

        .vote-buttons {
          display: flex;
          gap: 0.3rem;
        }

        .vote-button {
          background: var(--primary-orange);
          color: #fff;
          border: none;
          border-radius: 6px;
          padding: 0.2em 1em;
          font-size: 0.9em;
          font-weight: 600;
          cursor: pointer;
          display: inline-flex;
          align-items: center;
          gap: 0.2em;
          transition: background 0.2s, color 0.2s;

          &:disabled {
            background: #e5e7eb;
            color: #b1b5bb;
            cursor: not-allowed;
          }

          &:hover:not(:disabled) {
            background: #ffb347;
            color: #222;
          }

          .vote-arrow {
            font-size: 1em;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            position: relative;
            top: 2px;
          }
        }
      }

      .payment-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.85rem;

        .sats-info {
          display: flex;
          align-items: center;

          .sats-received {
            font-weight: 600;
          }
        }

        .mobile-lightning-button {
          color: var(--primary-orange);
          text-decoration: none;
          font-weight: 500;

          &:hover {
            text-decoration: underline;
          }
        }
      }

      /* Subtopics */
      .subtopics-container {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #e9ecef;
      }

      .subtopics-label {
        font-size: 0.85rem;
        margin-bottom: 0.1rem;
      }

      .subtopics-list {
        display: flex;
        flex-wrap: wrap;
      }

      .subtopic-item {
        margin-bottom: 0.1rem;
        border-radius: 4px;
        font-size: 0.9rem;
        font-weight: 500;

        a {
          color: rgb(34, 34, 34) !important;
          text-decoration: none;
          font-weight: 500;
        }

        a:hover {
          text-decoration: underline;
        }
      }
    }

    .toggles-container {
      display: flex;
      align-items: center;
      gap: 1em;
      flex-wrap: wrap;
    }

    .sats-btc-toggle {
      display: flex;
      align-items: center;
      gap: 0.5em;
      font-size: 0.85em;
    }

    .switch {
      position: relative;
      display: inline-block;
      width: 48px;
      height: 28px;
    }

    .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .slider {
      position: absolute;
      cursor: pointer;
      top: 0; left: 0; right: 0; bottom: 0;
      background-color: var(--primary-orange);
      border-radius: 34px;
      transition: .4s;
    }

    .slider:before {
      position: absolute;
      content: "";
      height: 20px; width: 20px;
      left: 5px;
      top: 0px;
      background-color: white;
      border-radius: 50%;
      transition: .3s;
    }

    .switch input:checked + .slider {
      background-color: #222;
    }

    .switch input:checked + .slider:before {
      transform: translateX(20px);
    }

    .toggle-label {
      font-weight: 600;
      color: #888;
      user-select: none;
    }

    .toggle-label-sats {
      color: var(--primary-orange);
    }

    .toggle-label-btc {
      margin-right: 0.5em;
      color: #222;
    }

    /* Lightning Effects Toggle */
    .lightning-effects-toggle {
      display: flex;
      align-items: center;
      gap: 0.5em;
      font-size: 0.85em;
    }

    .toggle-label-lightning {
      color: var(--primary-orange);
      font-weight: 600;
      user-select: none;
    }

  }

  /* Show page */
  .topic-show {
    .button {
      border-radius: 8px;
      padding: 0.4em 1.2em;
    }
    .page-header-row {
      margin-bottom: 0.5rem;
    }

    .topic-title {
      margin-top: 0rem;
      margin-bottom: 0rem;
    }

    .topic-link-row {
      margin-bottom: 0.5rem;

      .topic-link-show {
        display: block;
        word-break: break-all;
        color: var(--primary-orange);
        text-decoration: none;
        font-size: 1rem;
        line-height: 1.4;

        &:hover {
          text-decoration: underline;
        }
      }
    }

    .current-status {
      margin-top: 1rem;
      margin-bottom: 1rem;
      border: 1px solid #e9ecef;
      border-radius: 0.5rem;
      padding: 0.5rem;

      .current-status-title {
        font-weight: 600;
      }
    }

    .mobile-lnurl-section {
      margin-top: 1rem;
      margin-bottom: 1rem;
      border: 1px solid #e9ecef;
      border-radius: 0.5rem;
      padding: 0.5rem;

      .vote-using-lnurl {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1rem;
        font-weight: 600;
      }

      .lnurl-link {
        font-size: 1rem;
        font-weight: 600;
        padding: 0.2em 1em;
      }

      .lnurl-text {
        word-break: break-all;
        font-family: monospace;
        background: #f8f9fa;
        padding: 0.5rem;
        border-radius: 0.25rem;
        margin: 0.5rem 0;
        font-size: 0.9rem;
      }

      .copy-lnurl {
        margin: 0.5rem 0;
      }

      .copy-button {
        font-size: 1rem;
        font-weight: 600;
        margin-right: 0.3rem;
        padding: 0.2em 1em;
      }

      .or-text {
        text-align: center;
        font-weight: 600;
        font-size: 1.5rem;
        margin: 0.5rem 0;
      }
    }

    .back-to-topic-list {
      margin-top: 1rem;
      margin-bottom: 1rem;
      border: 1px solid #e9ecef;
      border-radius: 0.5rem;
      padding: 0.5rem;
    }

    .show-qr-button {
      display: block;
      width: 100%;
      padding: 0.75rem;
      margin: 1rem 0;
      color: var(--primary-orange);
      background-color: white;
      border: 1px solid #e9ecef;
      border-radius: 0.5rem;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: background-color 0.2s;

      &:hover {
        background: #ffb347;
      }

      i {
        margin-right: 0.5rem;
      }
    }

    .qr-code {
      margin-top: 1rem;
      margin-bottom: 1rem;
      border: 1px solid #e9ecef;
      border-radius: 0.5rem;
      padding: 1rem;
      text-align: center;

      img {
        max-width: 100%;
        height: auto;
        margin-top: 0.5rem;
      }

      &.hidden {
        display: none;
      }
    }
  }
}

/* Flash border animation for topic voting */
.topic-list-item.flash-border {
  animation: flash-border 0.7s cubic-bezier(.23,1.5,.32,1) both;
  border-radius: 8px;
}

/* Mobile Topic Form Styles */
.mobile-topic-form {
  .mobile-header {
    margin-bottom: 1rem;
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;

    .builder-logo-container {
      width: 80px;
      height: 60px;
      flex-shrink: 0;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
      }
    }

    .mobile-header-content {
      flex-grow: 1;

      .page-header-title {
        font-size: 1.5em;
        font-weight: 600;
        color: #333;
        margin-bottom: 0.25rem;
      }

      .page-header-subtitle {
        font-size: 1rem;
        color: #666;
        margin: 0;
      }
    }
  }

  .mobile-form-container {
    padding: 0 1rem;
  }

  .mobile-topic-form {
    .mobile-error-explanation {
      background-color: #f8d7da;
      border: 1px solid #f5c6cb;
      border-radius: 0.5rem;
      padding: 1rem;
      margin-bottom: 1rem;

      .mobile-error-title {
        color: #721c24;
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
      }

      .mobile-error-list {
        margin: 0;
        padding-left: 1rem;

        .mobile-error-item {
          color: #721c24;
          margin-bottom: 0.25rem;
          font-size: 0.9rem;
        }
      }
    }

    .mobile-field {
      margin-bottom: 1.5rem;

      .mobile-field-label {
        display: block;
        font-weight: 600;
        color: #333;
        margin-bottom: 0.5rem;
        font-size: 1rem;
      }

      .mobile-textarea,
      .mobile-text-input,
      .mobile-select {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid #ddd;
        border-radius: 0.5rem;
        font-size: 1rem;
        background-color: #fff;
        box-sizing: border-box;

        &:focus {
          outline: none;
          border-color: var(--primary-orange);
          box-shadow: 0 0 0 2px rgba(247, 147, 26, 0.2);
        }
      }

      .mobile-textarea {
        min-height: 80px;
        resize: vertical;
      }

      .mobile-select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 0.5rem center;
        background-repeat: no-repeat;
        background-size: 1.5em 1.5em;
        padding-right: 2.5rem;
        appearance: none;
      }

      .mobile-field-hint {
        font-size: 0.85rem;
        color: #666;
        margin-top: 0.25rem;
      }
    }

    .mobile-actions {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-top: 2rem;

      .mobile-submit-button,
      .mobile-back-button {
        display: block;
        width: 100%;
        max-width: 100%;
        padding: 0.875rem 1.5rem;
        border-radius: 0.5rem;
        font-size: 1rem;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        box-sizing: border-box;
      }

      .mobile-submit-button {
        background-color: var(--primary-orange);
        color: white;

        &:hover {
          background-color: #e67e00;
        }

        &:active {
          transform: translateY(1px);
        }
      }

      .mobile-back-button {
        background-color: #fff;
        color: #666;
        border: 1px solid #ddd;

        &:hover {
          background-color: #f8f9fa;
          border-color: var(--primary-orange);
          color: var(--primary-orange);
        }
      }
    }
  }
}
