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

/* Language Switch Styles */
.flip-switch-container {
  --card-width: 55px;
  --card-height: 60px;
  --switch-bg: rgba(255, 255, 255, 0.1);
  --switch-border-color: rgba(255, 255, 255, 0.2);
  --text-color: #ffffff;
  --inactive-text-color: rgba(255, 255, 255, 0.6);
  --icon-shadow-color: rgba(0, 0, 0, 0.3);
  --card-bg: linear-gradient(
    135deg,
    rgba(155, 237, 45, 0.3),
    rgba(155, 237, 45, 0.1)
  );
  --highlight-color: #9bed2d;

  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.flip-switch {
  display: flex;
  position: relative;
  width: calc(var(--card-width) * 2);
  height: var(--card-height);
  background: var(--switch-bg);
  border-radius: 15px;
  border: 1px solid var(--switch-border-color);
  box-shadow:
    0 8px 32px 0 rgba(31, 38, 135, 0.37),
    inset 0 4px 8px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  perspective: 1000px;
}

.flip-switch input[type="radio"] {
  display: none;
}

.flip-switch .switch-button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  z-index: 2;
  color: var(--inactive-text-color);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.flip-switch .switch-button:hover {
  color: var(--text-color);
}

.flip-switch .switch-button:hover svg {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 6px var(--icon-shadow-color)) brightness(1.2);
}

.flip-switch .switch-button svg {
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 2px 3px var(--icon-shadow-color));
  width: 20px;
  height: 20px;
}

.flip-switch .switch-button span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.flip-switch #switch-opt-1:checked ~ [for="switch-opt-1"],
.flip-switch #switch-opt-2:checked ~ [for="switch-opt-2"] {
  color: var(--text-color);
  text-shadow: 0 0 8px rgba(155, 237, 45, 0.5);
}

.flip-switch #switch-opt-1:checked ~ [for="switch-opt-2"],
.flip-switch #switch-opt-2:checked ~ [for="switch-opt-1"] {
  color: var(--inactive-text-color);
}

.flip-switch .switch-card {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--card-width);
  height: var(--card-height);
  z-index: 1;
  transform-style: preserve-3d;
}

.flip-switch .card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  background: var(--card-bg);
  border: 1px solid rgba(155, 237, 45, 0.3);
  box-shadow:
    0 4px 20px rgba(155, 237, 45, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-switch .card-back {
  transform: rotateY(180deg);
}

.flip-switch #switch-opt-2:checked ~ .switch-card {
  animation: flipRight 0.6s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.flip-switch #switch-opt-1:checked ~ .switch-card {
  animation: flipLeft 0.6s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes flipRight {
  0% {
    transform: translateX(0%) rotateY(0deg);
  }
  50% {
    transform: translateX(50%) rotateY(90deg) scale(1.05);
  }
  100% {
    transform: translateX(100%) rotateY(180deg) scale(1);
  }
}

@keyframes flipLeft {
  0% {
    transform: translateX(100%) rotateY(180deg);
  }
  50% {
    transform: translateX(50%) rotateY(90deg) scale(1.05);
  }
  100% {
    transform: translateX(0%) rotateY(0deg) scale(1);
  }
}

.flip-switch #switch-opt-1:checked ~ [for="switch-opt-1"]::after,
.flip-switch #switch-opt-2:checked ~ [for="switch-opt-2"]::after {
  content: "";
  position: absolute;
  bottom: -3px;
  width: 20px;
  height: 2px;
  background: var(--highlight-color);
  border-radius: 2px;
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 5px var(--highlight-color);
  }
  to {
    box-shadow:
      0 0 10px var(--highlight-color),
      0 0 15px var(--highlight-color);
  }
}

/* Mobile responsive for language switch */
@media screen and (max-width: 768px) {
  .flip-switch-container {
    top: 10px;
    right: 10px;
  }
  
  .flip-switch {
    transform: scale(0.9);
  }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: url('bg.jpg') center center / cover no-repeat;
    background-attachment: scroll;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: auto;
}

/* 针对移动设备的背景优化 */
@media screen and (max-width: 768px) {
    body {
        background: url('bg.jpg') center center / cover no-repeat, #0a0a0a;
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        min-height: 100vh;
        min-height: 100dvh; /* 动态视口高度 */
        padding: 10px;
        align-items: flex-start;
    }
    
    .container {
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .main-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .card-preview-section {
        min-height: 300px;
        padding: 20px;
    }
    
    .editor-section {
        flex: 1;
        max-width: 100%;
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: -1;
}

/* 移动端背景修复 */
@media screen and (max-width: 768px) {
    body::before {
        position: absolute;
        background: rgba(0, 0, 0, 0.2);
    }
    
    /* iOS Safari 特殊处理 */
    @supports (-webkit-touch-callout: none) {
        body {
            background: #0a0a0a url('bg.jpg') center center / cover no-repeat;
            background-attachment: scroll !important;
            position: relative;
        }
        
        body::after {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('bg.jpg') center center / cover no-repeat;
            z-index: -2;
        }
    }
}

.container {
    max-width: 1200px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: #ffffff;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

header p {
    color: #cccccc;
    font-size: 16px;
}

.ca-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ca-label {
    color: #9bed2d;
    font-weight: 600;
    font-size: 14px;
}

.ca-value {
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
    flex: 1;
    text-align: center;
}

.copy-btn {
    background: rgba(155, 237, 45, 0.2);
    border: 1px solid rgba(155, 237, 45, 0.4);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #9bed2d;
}

.copy-btn:hover {
    background: rgba(155, 237, 45, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(155, 237, 45, 0.3);
}

/* Version Switch Styles - From Uiverse.io by mobinkakei */
.version-switch-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.switch-holder {
    display: flex;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: -8px -8px 15px rgba(255, 255, 255, .1),
          10px 10px 10px rgba(0, 0, 0, .3),
          inset 8px 8px 15px rgba(255, 255, 255, .1),
          inset 10px 10px 10px rgba(0, 0, 0, .3);
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.switch-label {
    padding: 0 20px 0 10px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 14px;
}

.switch-label i {
    margin-right: 5px;
}

.switch-toggle {
    height: 40px;
}

.switch-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    z-index: -2;
}

.switch-toggle input[type="checkbox"] + label {
    position: relative;
    display: inline-block;
    width: 100px;
    height: 40px;
    border-radius: 20px;
    margin: 0;
    cursor: pointer;
    box-shadow: inset -8px -8px 15px rgba(255, 255, 255, .1),
          inset 10px 10px 10px rgba(0, 0, 0, .4);
    background: rgba(0, 0, 0, 0.2);
}

.switch-toggle input[type="checkbox"] + label::before {
    position: absolute;
    content: 'V1';
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 25px;
    top: 8px;
    left: 8px;
    width: 45px;
    height: 25px;
    border-radius: 20px;
    background-color: rgba(238, 238, 238, 0.9);
    color: #666;
    box-shadow: -3px -3px 5px rgba(255, 255, 255, .2),
          3px 3px 5px rgba(0, 0, 0, .4);
    transition: .3s ease-in-out;
}

.switch-toggle input[type="checkbox"]:checked + label::before {
    left: 50%;
    content: 'V2';
    color: #fff;
    background-color: #9bed2d;
    box-shadow: -3px -3px 5px rgba(255, 255, 255, .2),
          3px 3px 5px rgba(155, 237, 45, .4);
}

.version-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-align: center;
}

/* Version Content Display Control */
.version-content {
    width: 100%;
}

#main-version-container {
    width: 100%;
}

/* 默认隐藏V1，显示V2 */
.v1-content {
    display: none;
}

.v2-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
    min-height: 500px;
}

/* 版本切换 */
#main-version-container.show-v1 .v1-content {
    display: flex;
}

#main-version-container.show-v1 .v2-content {
    display: none;
}

#main-version-container.show-v2 .v1-content {
    display: none;
}

#main-version-container.show-v2 .v2-content {
    display: grid;
}

/* V2 Specific Styles */
:root {
    --primary-color-v2: #9aed2c;
    --secondary-color-v2: #7dd321;
    --accent-color-v2: #b8f054;
    --danger-color-v2: #ff6b6b;
    --dark-bg-v2: #1a1a1a;
    --light-bg-v2: #f8faf7;
    --card-bg-v2: #ffffff;
    --text-primary-v2: #2c3e50;
    --text-secondary-v2: #6c757d;
    --border-radius-v2: 16px;
    --border-radius-sm-v2: 8px;
    --shadow-v2: 0 10px 30px rgba(154, 237, 44, 0.15);
    --shadow-sm-v2: 0 2px 8px rgba(154, 237, 44, 0.08);
}

.control-panel {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(154, 237, 44, 0.2);
    border-radius: var(--border-radius-v2);
    padding: 30px;
    box-shadow: var(--shadow-v2);
    max-height: 85vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    min-height: 400px; /* 确保有最小高度 */
}

.control-panel::-webkit-scrollbar {
    width: 8px;
}

.control-panel::-webkit-scrollbar-track {
    background: var(--light-bg-v2);
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 4px;
}

.panel-title {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--primary-color-v2);
    font-weight: 700;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #E2E8F0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(154, 237, 44, 0.8);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ffffff;
    font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(154, 237, 44, 0.3);
    border-radius: var(--border-radius-sm-v2);
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(5px);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(154, 237, 44, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #E2E8F0;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color-v2);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm-v2);
}

.level-input {
    display: flex;
    align-items: center;
    gap: 15px;
}

.level-stars {
    font-size: 20px;
    color: #FFD700;
    min-width: 120px;
}

.stat-input {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-value {
    background: var(--primary-color-v2);
    color: var(--dark-bg-v2);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
}

.upload-area {
    border: 2px dashed rgba(154, 237, 44, 0.4);
    border-radius: var(--border-radius-sm-v2);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(154, 237, 44, 0.05);
}

.upload-area:hover {
    border-color: var(--primary-color-v2);
    background: rgba(154, 237, 44, 0.1);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.upload-icon {
    color: var(--primary-color-v2);
}

.ticker-upload-area {
    border: 2px dashed rgba(154, 237, 44, 0.4);
    border-radius: var(--border-radius-sm-v2);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(154, 237, 44, 0.05);
}

.ticker-upload-area:hover {
    border-color: var(--primary-color-v2);
    background: rgba(154, 237, 44, 0.1);
}

.ticker-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.input-with-ai {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.ai-generate-btn {
    padding: 8px 12px;
    background: var(--accent-color-v2);
    color: var(--dark-bg-v2);
    border: none;
    border-radius: var(--border-radius-sm-v2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ai-generate-btn:hover {
    background: var(--primary-color-v2);
    transform: translateY(-2px);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm-v2);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary-color-v2);
    color: var(--dark-bg-v2);
}

.btn-primary:hover {
    background: var(--secondary-color-v2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm-v2);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color-v2);
    border: 2px solid var(--primary-color-v2);
}

.btn-secondary:hover {
    background: var(--primary-color-v2);
    color: var(--dark-bg-v2);
}

.preview-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 400px; /* 确保有最小高度 */
}

.preview-container {
    background: rgba(154, 237, 44, 0.05);
    border: 1px solid rgba(154, 237, 44, 0.2);
    border-radius: var(--border-radius-v2);
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-v2);
    perspective: 1000px;
}

.card-preview {
    width: 400px;
    height: auto;
    min-height: 620px;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%),
        linear-gradient(135deg, 
            #ffffff 0%, 
            #f8f9fa 15%, 
            #e9ecef 25%, 
            #ffffff 35%, 
            #f1f3f4 45%, 
            #e8eaed 55%, 
            #ffffff 65%, 
            #f5f5f5 75%, 
            #e9ecef 85%, 
            #ffffff 100%),
        linear-gradient(90deg, 
            rgba(255, 0, 150, 0.1) 0%, 
            rgba(0, 204, 255, 0.1) 20%, 
            rgba(128, 255, 0, 0.1) 40%, 
            rgba(255, 255, 0, 0.1) 60%, 
            rgba(255, 128, 0, 0.1) 80%, 
            rgba(255, 0, 150, 0.1) 100%) !important;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 
                0 0 50px rgba(255, 255, 255, 0.8),
                0 0 100px rgba(154, 237, 44, 0.2),
                inset 0 2px 4px rgba(255, 255, 255, 0.95),
                inset 0 -2px 4px rgba(0, 0, 0, 0.15),
                inset 2px 0 8px rgba(255, 255, 255, 0.4),
                inset -2px 0 8px rgba(0, 0, 0, 0.08),
                inset 0 0 30px rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.95);
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    overflow: hidden;
    color: #333;
}

.card-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, 
            rgba(255, 0, 150, 0.15) 0%, 
            rgba(0, 204, 255, 0.15) 20%, 
            rgba(128, 255, 0, 0.15) 40%, 
            rgba(255, 255, 0, 0.15) 60%, 
            rgba(255, 128, 0, 0.15) 80%, 
            transparent 100%);
    border-radius: 20px;
    pointer-events: none;
    opacity: 0.8;
}

/* 移除旋转彩虹效果 - 注释掉::after伪元素 */
/*
.card-preview::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: conic-gradient(from 0deg, 
        rgba(255, 0, 150, 0.08) 0deg, 
        rgba(255, 255, 0, 0.08) 60deg, 
        rgba(0, 255, 150, 0.08) 120deg, 
        rgba(0, 150, 255, 0.08) 180deg, 
        rgba(150, 0, 255, 0.08) 240deg, 
        rgba(255, 0, 150, 0.08) 300deg, 
        rgba(255, 0, 150, 0.08) 360deg);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
    filter: blur(1px);
}
*/

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
}

.card-header .ticker-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    overflow: hidden;
}

.card-header .ticker-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.3);
}

.card-header .ticker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.ticker-placeholder svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.card-title-header {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.card-main-title {
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 1px;
    margin: 0;
    text-transform: uppercase;
    color: #6B7280;
    text-align: center;
    background: rgba(243, 244, 246, 0.9);
    padding: 6px 16px;
    border-radius: 16px;
    border: 1px solid rgba(209, 213, 219, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card-issue {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-image-container {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.card-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #CBD5E0;
    text-align: center;
}

.card-image-placeholder svg {
    width: 32px;
    height: 32px;
    color: #E2E8F0;
    margin-bottom: 8px;
}

.card-image-placeholder p {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.card-image-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    height: 250px !important;
    width: 250px !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.card-image-container img {
    user-select: none;
    transition: transform 0.1s ease;
}

.card-image-container img.dragging {
    cursor: grabbing;
    transition: none;
}

.card-info {
    text-align: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 4px 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.card-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

.level-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
}

.card-level .level-stars {
    font-size: 18px;
    color: var(--secondary-color-v2);
    letter-spacing: 2px;
    filter: drop-shadow(0 0 4px rgba(154, 237, 44, 0.4));
}

.card-stats {
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.stat-icon {
    font-size: 14px;
    width: 20px;
}

.stat-name {
    font-size: 12px;
    min-width: 40px;
}

.stat-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color-v2), var(--accent-color-v2));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.card-ability {
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ability-title {
    font-size: 12px;
    margin: 0 0 4px 0;
    opacity: 0.8;
    font-weight: 600;
}

.ability-text {
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.card-stats {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-icon {
    font-size: 16px;
    min-width: 20px;
}

.stat-name {
    font-size: 11px;
    font-weight: 700;
    color: #495057;
    min-width: 35px;
}

.stat-bar {
    flex: 1;
    height: 6px;
    background: #F0E6D2;
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color-v2), var(--primary-color-v2));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.card-ability {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ability-title {
    font-size: 12px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 4px;
}

.ability-text {
    font-size: 11px;
    color: #6c757d;
    line-height: 1.3;
}

.card-description {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 10px;
    font-size: 11px;
    color: #495057;
    line-height: 1.4;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    min-height: 40px;
    flex: 1;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card-description p {
    margin: 0;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.card-series {
    font-size: 10px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-number {
    font-size: 10px;
    color: #6c757d;
    font-weight: 700;
}

.main-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.card-preview-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    position: relative;
    backdrop-filter: blur(10px);
}

.card-container {
    position: relative;
    width: 400px;
    height: 400px;
    background: transparent;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#idCardCanvas {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 15px;
}

.editor-section {
    flex: 0 0 420px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.editor-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.camera-icon {
    background: #9bed2d;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
}

.camera-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.editor-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.upload-section, .input-section, .save-section {
    margin-bottom: 25px;
}

label {
    display: block;
    color: #cccccc;
    font-size: 14px;
    margin-bottom: 12px;
}

.upload-button {
    width: 100%;
}

.select-photo-btn {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: #ffffff;
}

.select-photo-btn:hover {
    border-color: #9bed2d;
    background: rgba(155, 237, 45, 0.2);
    box-shadow: 0 0 20px rgba(155, 237, 45, 0.3);
}

.input-group {
    position: relative;
    margin-bottom: 12px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #cccccc;
    font-size: 18px;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.input-group input::placeholder, .input-group textarea::placeholder {
    color: #999999;
}

.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: #9bed2d;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(155, 237, 45, 0.2);
}

.add-profession-btn {
    width: 100%;
    padding: 10px;
    background: rgba(155, 237, 45, 0.1);
    border: 2px dashed rgba(155, 237, 45, 0.6);
    border-radius: 10px;
    color: #9bed2d;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.add-profession-btn:hover {
    background: rgba(155, 237, 45, 0.2);
    box-shadow: 0 0 20px rgba(155, 237, 45, 0.3);
}

.export-btn {
    width: 100%;
    padding: 14px 20px;
    background: #9bed2d;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: #000000;
}

.export-btn:hover {
    background: #8bd424;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 237, 45, 0.4);
}

.tips-section {
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.tips-toggle {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    color: #ffffff;
}

.tips-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tips-content {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.tips-content ul {
    list-style: none;
    padding: 0;
}

.tips-content li {
    padding: 8px 0;
    color: #cccccc;
    font-size: 14px;
    position: relative;
    padding-left: 20px;
}

.tips-content li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #9bed2d;
}

.privacy-notice {
    margin-top: 20px;
    padding: 12px;
    background: rgba(92, 107, 192, 0.1);
    border: 1px solid rgba(92, 107, 192, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #9fa8da;
}

.arrow {
    transition: transform 0.3s ease;
}

.tips-toggle.active .arrow {
    transform: rotate(180deg);
}

/* 项目展示Gallery - 默认隐藏，只在V1模式显示 */
.projects-gallery {
    margin-top: 60px;
    width: 100%;
    overflow: hidden;
    display: none; /* 默认隐藏 */
}

/* Gallery 头部样式 */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.projects-gallery h3 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    margin: 0;
}

.gallery-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.refresh-btn {
    background: rgba(155, 237, 45, 0.1);
    border: 2px solid rgba(155, 237, 45, 0.6);
    border-radius: 10px;
    color: #9bed2d;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.refresh-btn:hover {
    background: rgba(155, 237, 45, 0.2);
    box-shadow: 0 0 15px rgba(155, 237, 45, 0.3);
    transform: translateY(-2px);
}

.update-info {
    text-align: right;
    font-size: 12px;
}

.last-update {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 4px;
}

.auto-refresh-info {
    color: #9bed2d;
    font-size: 11px;
    opacity: 0.8;
}

.gallery-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-track {
    display: flex;
    gap: 20px;
    animation: autoScroll 30s linear infinite;
    width: max-content;
}

@keyframes autoScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.project-card {
    flex: 0 0 280px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(155, 237, 45, 0.5);
    box-shadow: 0 10px 30px rgba(155, 237, 45, 0.2);
}

.project-image {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    background: rgba(155, 237, 45, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.project-placeholder {
    font-size: 48px;
    opacity: 0.8;
}

/* Token 真实图片样式 */
.token-logo-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(155, 237, 45, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.project-info h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-info p {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.project-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.project-status.live {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.4);
}

.project-status.beta {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.4);
}

.project-status.coming {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.4);
}

/* 暂停动画在悬停时 */
.gallery-track:hover {
    animation-play-state: paused;
}

/* Token 相关样式 */
.loading-card {
    flex: 0 0 280px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccccc;
    font-size: 16px;
}

.token-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.token-price {
    font-weight: 600;
    color: #ffffff;
    font-size: 16px;
}

.token-change {
    font-size: 14px;
    font-weight: 500;
}

.token-change.positive {
    color: #27ae60;
}

.token-change.negative {
    color: #e74c3c;
}

/* Token 排名样式 */
.token-ranking {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(155, 237, 45, 0.9);
    color: #000000;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(155, 237, 45, 0.3);
}

/* Token 市值样式 */
.token-marketcap {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.marketcap-label {
    color: #cccccc;
    font-weight: 500;
}

.marketcap-value {
    color: #9bed2d;
    font-weight: 600;
    margin-left: 5px;
}

/* Token 详情模态框 */
.token-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(20px);
    color: #ffffff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: #9bed2d;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #cccccc;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.modal-body p {
    margin: 12px 0;
    font-size: 16px;
    line-height: 1.5;
}

.modal-body strong {
    color: #9bed2d;
}

.modal-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trade-btn {
    width: 100%;
    padding: 12px 20px;
    background: #9bed2d;
    border: none;
    border-radius: 10px;
    color: #000000;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trade-btn:hover {
    background: #8bd424;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 237, 45, 0.4);
}

/* 合约地址样式 */
.contract-address {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(155, 237, 45, 0.3);
    border-radius: 10px;
}

.address-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.address-text {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #9bed2d;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    flex: 1;
    word-break: break-all;
    border: 1px solid rgba(155, 237, 45, 0.2);
}

.copy-address-btn {
    background: rgba(155, 237, 45, 0.2);
    border: 1px solid rgba(155, 237, 45, 0.4);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #9bed2d;
}

.copy-address-btn:hover {
    background: rgba(155, 237, 45, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(155, 237, 45, 0.3);
}

/* 复制成功提示动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 968px) {
    .main-content {
        flex-direction: column;
    }
    
    .editor-section {
        flex: 1;
        max-width: 100%;
    }
    
    .card-preview-section {
        width: 100%;
    }
    
    .projects-gallery {
        margin-top: 40px;
    }
    
    .project-card {
        flex: 0 0 250px;
        padding: 15px;
    }
    
    .gallery-track {
        gap: 15px;
    }
    
    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .gallery-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .update-info {
        text-align: left;
    }
}