* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "微软雅黑", "PingFang SC", sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
body {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}
#canvas_background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(64, 150, 255, 0.08);
    border: 1px solid rgba(64, 150, 255, 0.1);
    position: relative;
    z-index: 1;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
h1 {
    color: #1e293b;
    font-size: 24px;
    white-space: nowrap;
    flex-shrink: 0;
    text-shadow: 0 0 8px rgba(64, 150, 255, 0.2);
}
.user-info {
    color: #334155;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
}
.user-line {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    width: 100%;
}
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 999;
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 12px;
    transition: all 0.2s;
}
.nav-item.active {
    color: #4096ff;
}
.nav-item .icon {
    font-size: 20px;
    margin-bottom: 4px;
}
@media (max-width: 768px) {
    .user-info {
        font-size: 12px;
        text-align: right;
        width: 100%;
    }
    .user-line {
        gap: 6px;
        justify-content: flex-end;
    }
    .resource-tag, .vip-tag, .welcome-text, .logout-link {
        font-size: 11px;
        padding: 2px 6px;
        white-space: nowrap;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    h1 {
        font-size: 20px;
        width: 100%;
        text-align: left;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .header .user-info {
        display: none !important;
    }
    body {
        padding-bottom: 70px;
        padding: 10px;
    }
    .container {
        padding: 15px;
        max-width: 100%;
    }
    .header {
        margin-bottom: 15px;
        gap: 10px;
    }
    .style-selector {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .style-item {
        padding: 8px 4px;
        font-size: 12px;
    }
    .style-item span {
        font-size: 14px;
    }
    textarea {
        min-height: 100px;
        padding: 12px;
        font-size: 13px;
    }
    button {
        padding: 10px;
        font-size: 15px;
    }
    .share-card {
        padding: 15px;
        z-index: 998;
    }
    .share-card-title {
        font-size: 20px;
    }
    .share-card-desc {
        font-size: 16px;
    }
    .share-card-image {
        width: 80px;
        height: 80px;
    }
}
.vip-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid transparent;
}
.vip-permanent {
    background: linear-gradient(135deg, #2a1a00 0%, #1a0a00 100%);
    border-color: rgba(255,215,0,0.6);
    position: relative;
    overflow: hidden;
}
.vip-permanent::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.2), transparent);
    animation: goldShine 3s infinite;
}
@keyframes goldShine {
    100% { left: 100%; }
}
.vip-month {
    background: linear-gradient(120deg, #ffd700, #ffb800);
    border-color: #ffd700;
}
.vip-month-expired {
    background: linear-gradient(120deg, #999, #666);
    border-color: #999;
    opacity: 0.8;
}
.normal-user {
    color: #27ae60;
    font-size: 14px;
}
.resource-tag {
    color: #334155;
    background: rgba(241, 245, 249, 0.8);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid rgba(64, 150, 255, 0.15);
}
.auth-btn {
    color: #4096ff;
    text-decoration: none;
    padding: 4px 8px;
    font-size: 12px;
}
.register-btn {
    background: #67c23a;
    color: white !important;
    border-radius: 4px;
}
.register-btn:hover {
    background: #529b2e;
    box-shadow: 0 0 10px rgba(103, 194, 58, 0.3);
}
.welcome-text {
    color: #334155;
    font-weight: 500;
    font-size: 14px;
}
.logout-link {
    color: #e74c3c;
    text-decoration: none;
    font-size: 12px;
}
.style-selector {
    margin: 0 auto 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 100%;
}
.style-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(64, 150, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #1e293b;
}
.style-item:hover {
    border-color: #4096ff;
    background: rgba(236, 248, 255, 0.9);
    box-shadow: 0 0 10px rgba(64, 150, 255, 0.2);
}
.style-item.active {
    background: #4096ff;
    color: white;
    border-color: #4096ff;
    box-shadow: 0 0 15px rgba(64, 150, 255, 0.3);
}
.style-item input {
    display: none;
}
.style-item span {
    font-size: 18px;
}
.style-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.input-area {
    margin-bottom: 20px;
}
.scene-selector {
    margin: 15px 0;
    font-size: 14px;
    color: #334155;
}
.scene-selector select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(64, 150, 255, 0.15);
    margin-left: 10px;
    min-width: 180px;
    font-size: 14px;
    background: rgba(248, 250, 252, 0.9);
    color: #1e293b;
}
textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(64, 150, 255, 0.15);
    border-radius: 8px;
    resize: vertical;
    min-height: 120px;
    font-size: 14px;
    line-height: 1.6;
    background: rgba(248, 250, 252, 0.9);
    color: #1e293b;
}
textarea::placeholder {
    color: rgba(100, 116, 139, 0.7);
}
.generate-count {
    margin: 15px 0;
    font-size: 14px;
    color: #334155;
}
.generate-count select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(64, 150, 255, 0.15);
    font-size: 14px;
    background: rgba(248, 250, 252, 0.9);
    color: #1e293b;
}
button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #4096ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 10;
}
button:hover {
    background-color: #3088ff;
    box-shadow: 0 0 15px rgba(64, 150, 255, 0.3);
}
button:disabled {
    background-color: rgba(64, 150, 255, 0.5);
    cursor: not-allowed;
}
.result-area {
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(248, 250, 252, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(64, 150, 255, 0.15);
}
.result-title {
    color: #1e293b;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 16px;
    text-shadow: 0 0 8px rgba(64, 150, 255, 0.2);
}
.reply-item {
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(64, 150, 255, 0.1);
}
.reply-content {
    color: #1e293b;
    line-height: 1.8;
    font-size: 15px;
    white-space: pre-wrap;
    margin-bottom: 10px;
}
.copy-btn {
    padding: 6px 12px;
    background: #4096ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.copy-btn:hover {
    background: #3088ff;
    box-shadow: 0 0 10px rgba(64, 150, 255, 0.2);
}
.copy-btn.copied {
    background: #67c23a;
}
.token-info {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(100, 116, 139, 0.7);
}
.error {
    color: #f56c6c;
    padding: 15px;
    background-color: rgba(254, 240, 240, 0.8);
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    border: 1px solid rgba(245, 108, 108, 0.3);
}
.hint {
    font-size: 12px;
    color: rgba(100, 116, 139, 0.7);
    margin-top: 8px;
    line-height: 1.4;
}
.loading {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    color: #4096ff;
    font-size: 14px;
}
.loading-spinner {
    border: 4px solid rgba(64, 150, 255, 0.1);
    border-top: 4px solid #4096ff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.resource-info {
    padding: 10px 15px;
    background: rgba(236, 248, 255, 0.8);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1890ff;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    border: 1px solid rgba(24, 144, 255, 0.2);
}
.share-card {
    margin-top: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    user-select: none;
}
.share-card * {
    pointer-events: none;
}
.share-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
.share-card-content {
    flex: 1;
}
.share-card-title {
    font-size: 28px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 8px;
}
.share-card-desc {
    font-size: 24px;
    color: #9ca3af;
}
.share-card-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.invite-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999 !important;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.invite-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 999999 !important;
}
.invite-module {
    padding: 10px 0;
}
.invite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}
.invite-header h3 {
    color: #4096ff;
    font-size: 18px;
    margin: 0;
}
.invite-code {
    font-size: 14px;
    color: #334155;
}
.code-text {
    color: #e6a23c;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
}
.invite-rule {
    font-size: 14px;
    color: #334155;
    margin-bottom: 15px;
    line-height: 1.6;
}
.invite-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.stat-item {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(64, 150, 255, 0.15);
    text-align: center;
}
.stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}
.stat-value {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #1e293b;
}
.invite-action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.withdraw-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4096ff 0%, #3088ff 100%);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(64, 150, 255, 0.3);
}
.withdraw-btn:hover {
    background: linear-gradient(135deg, #3088ff 0%, #2078ff 100%);
    box-shadow: 0 4px 12px rgba(64, 150, 255, 0.4);
    transform: translateY(-1px);
}
.withdraw-tip {
    font-size: 14px;
    color: #94a3b8;
    padding: 8px 0;
}
.profile-container {
    max-width: 1200px;
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(64,150,255,0.08);
    position: relative;
    z-index: 1;
}
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}
.profile-user-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding: 20px;
    background: rgba(241,245,249,0.8);
    border-radius: 12px;
    border: 1px solid rgba(64,150,255,0.15);
}
.profile-user-info .user-line {
    justify-content: center;
}
.user-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 15px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    position: relative;
    overflow: hidden;
    border: 2px solid #d4af37;
}
.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(255,215,0,0.18) 0%, transparent 50%);
    pointer-events: none;
}
.user-name {
    font-size: 32px;
    font-weight: 700;
    color: #B8860B;
    margin-bottom: 20px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-name::before {
    content: "👤";
    font-size: 28px;
    color: #D4AF37;
}
.user-name::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,184,0,0.15), transparent);
    animation: badgeShine 4s infinite;
    pointer-events: none;
}
.vip-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid rgba(212,175,55,0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
}
.vip-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.15), transparent);
    animation: badgeShine 4s infinite;
}
@keyframes badgeShine {
    100% { left: 100%; }
}
.vip-badge .crown-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 6px rgba(212,175,55,0.6));
}
.vip-badge .main-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFB800 0%, #DAA520 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.vip-badge .sub-text {
    font-size: 14px;
    color: #DAA520;
    opacity: 0.9;
    font-weight: 400;
    margin-left: 8px;
}
.vip-badge.permanent {
    background: linear-gradient(135deg, #2a1a00 0%, #1a0a00 100%);
    border-color: rgba(255,215,0,0.6);
}
.vip-badge.permanent .crown-icon {
    color: #FFB800;
    animation: crownPulse 2s ease-in-out infinite;
}
@keyframes crownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.vip-badge.season {
    background: linear-gradient(135deg, #2a1a3a 0%, #1a0a2a 100%);
    border-color: rgba(139,92,246,0.6);
}
.vip-badge.season .crown-icon {
    color: #8b5cf6;
}
.vip-badge.season .main-text {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.vip-badge.season .sub-text {
    color: #8b5cf6;
}
.vip-badge.month {
    background: linear-gradient(135deg, #3a2a00 0%, #2a1a00 100%);
    border-color: rgba(234,179,8,0.6);
}
.vip-badge.month .crown-icon {
    color: #eab308;
}
.vip-badge.month .main-text {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.vip-badge.month .sub-text {
    color: #eab308;
}
.vip-badge.expired {
    background: #334155;
    border-color: rgba(148,163,184,0.4);
}
.vip-badge.expired .crown-icon {
    color: #94a3b8;
}
.vip-badge.expired .main-text {
    color: #94a3b8;
    background: none;
    -webkit-text-fill-color: #94a3b8;
}
.vip-badge.normal {
    background: linear-gradient(135deg, #0a2a1a 0%, #001a0a 100%);
    border-color: rgba(16,185,129,0.6);
}
.vip-badge.normal .crown-icon {
    color: #10b981;
}
.vip-badge.normal .main-text {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.premium-input-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
  margin: 20px 0;
}
.input-wrapper {
  position: relative;
  margin: 24px 0;
  background: #ffffff;
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}
.input-wrapper:focus-within {
  box-shadow: 0 12px 40px rgba(54, 207, 201, 0.15), 0 4px 12px rgba(54, 207, 201, 0.08);
  transform: translateY(-2px);
}
.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}
.label-icon {
  font-size: 18px;
}
.premium-textarea {
  width: 100%;
  min-height: 140px;
  padding: 16px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
  color: #334155;
  background: #f8fafc;
  resize: vertical;
  transition: all 0.3s ease;
  outline: none;
}
.premium-textarea::placeholder {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.5;
}
.premium-textarea:focus {
  border-color: #36cfc9;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(54, 207, 201, 0.1);
}
.input-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  color: #64748b;
}
.hint-icon {
  font-size: 14px;
}
#submitBtn {
  width: 100%;
  height: 52px;
  margin-top: 16px;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #36cfc9 0%, #20c997 100%);
  box-shadow: 0 6px 20px rgba(54, 207, 201, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}
#submitBtn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(54, 207, 201, 0.4);
}
#submitBtn:active:not(:disabled) {
  transform: translateY(0);
}
#submitBtn:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal-overlay {
    display: none;
}
.modal-content {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    background: #0a0a0a;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3), 0 0 60px rgba(138, 43, 226, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #00d4ff, #8a2be2, #ff00ff, #00d4ff);
    background-size: 400% 400%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderGlow 8s linear infinite;
}
@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.modal-header {
    padding: 16px 20px;
    background: linear-gradient(90deg, #0f0f23, #1a1a3a);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}
.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.modal-close {
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4444;
    text-shadow: 0 0 8px rgba(255, 68, 64, 0.6);
}
.modal-close:hover {
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(255, 68, 64, 0.9);
}
.modal-loading {
    padding: 40px 20px;
    text-align: center;
    color: #00d4ff;
    font-size: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1), transparent);
}
.modal-loading .loading-spinner {
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}
.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    background: #0a0a0a;
    position: relative;
}
.modal-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.08) 0%, transparent 40%);
    pointer-events: none;
}
.reply-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.reply-item {
    padding: 16px;
    background: rgba(15, 15, 35, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    position: relative;
    font-size: 14px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(4px);
}
.reply-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #00d4ff, #8a2be2);
    border-radius: 2px;
}
.reply-item p {
    margin: 0;
    line-height: 1.6;
    color: #e0e0e0;
    white-space: pre-wrap;
    word-break: break-all;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}
.reply-copy {
    position: static;
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: #00d4ff;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}
.reply-copy:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
    color: #fff;
}
.modal-footer {
    padding: 16px;
    border-top: 1px solid rgba(138, 43, 226, 0.3);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    background: linear-gradient(90deg, #0f0f23, #1a1a3a);
    width: 100%;
    box-sizing: border-box;
}
.modal-footer-row {
    display: flex;
    gap: 12px;
    width: 100%;
}
.modal-footer-center {
    display: flex;
    justify-content: center;
    width: 100%;
}
.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-footer-row .modal-btn {
    flex: 1;
}
.modal-footer-center .modal-btn {
    width: 100%;
    border-radius: 10px;
}
.modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}
.modal-btn:hover::before {
    left: 100%;
}
.copy-all {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}
.copy-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}
.regenerate {
    background: linear-gradient(135deg, #8a2be2, #9932cc);
    color: white;
    text-shadow: 0 0 8px rgba(138, 43, 226, 0.6);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}
.regenerate:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
}
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        width: 95%;
    }
    .modal-header h2 {
        font-size: 16px;
    }
    .modal-body {
        padding: 15px;
        max-height: 50vh;
    }
    .modal-footer {
        padding: 12px;
        gap: 8px;
    }
    .modal-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 90px;
    }
    .reply-item {
        padding: 12px;
        font-size: 13px;
    }
    .reply-copy {
        font-size: 12px;
        padding: 5px 10px;
    }
    #submitBtn {
        position: relative !important;
        z-index: 999 !important;
        touch-action: manipulation !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    .result-modal, .invite-modal {
        touch-action: none !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .modal-btn {
        min-height: 44px !important;
        min-width: 80px !important;
    }
    .reply-copy {
        min-height: 36px !important;
        min-width: 60px !important;
    }
    .close-modal, .modal-close {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    body {
        padding-bottom: 80px !important;
    }
    .premium-textarea {
        font-size: 16px !important;
    }
    .modal-content {
        max-height: 85vh !important;
        width: 95% !important;
        margin: 0 auto !important;
    }
    .modal-body {
        max-height: 50vh !important;
    }
}
#canvas_background {
    pointer-events: none !important;
}
.reply-copy {
    position: static;
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    background: #e2e8f0;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}
.reply-copy:hover {
    background: #36cfc9;
    color: white;
}

/* ✅ 最终修复：关闭按钮 无黑背景、干净X */
.close-modal {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    min-height: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    color: #666 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    z-index: 99999999 !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}
.close-modal:hover {
    background: transparent !important;
    color: #333 !important;
}
/* 统一充值/邀请按钮高度（电脑端+移动端通用） */
.recharge-btn, .invite-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
    height: 32px !important;
    line-height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

/* 保持原有颜色区分 */
.recharge-btn {
    background: #4096ff;
    color: white !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.recharge-btn:hover {
    background: #3088ff;
    box-shadow: 0 0 10px rgba(64, 150, 255, 0.3);
}
.invite-btn {
    background: #67c23a;
    color: white !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    z-index: 99999;
}
.invite-btn:hover {
    background: #529b2e;
    box-shadow: 0 0 10px rgba(103, 194, 58, 0.3);
}