@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-1: #100c1a;
    --bg-2: #1a1029;
    --panel: rgba(255, 255, 255, 0.06);
    --panel-strong: rgba(255, 255, 255, 0.12);
    --primary: #6a45e7;
    --primary-strong: #2656f3;
    --accent: #ff4fa1;
    --success: #0ee6a2;
    --text: #f4f5fb;
    --muted: #b2bcdd;
    --border: rgba(255, 255, 255, 0.16);
    --shadow: 0 30px 70px rgba(10, 7, 18, 0.55);
    --glow: 0 0 55px rgba(106, 69, 231, 0.28);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

body {
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 179, 116, 0.3), transparent 32%),
        radial-gradient(circle at 85% 15%, rgba(109, 90, 255, 0.35), transparent 35%),
        radial-gradient(circle at 75% 75%, rgba(70, 104, 255, 0.28), transparent 38%),
        linear-gradient(135deg, #0c0a18 0%, #16102a 55%, #0d0a1f 100%);
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text);
    width: 100%;
    margin: 0;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    overflow: hidden;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(45px);
    opacity: 0.85;
    pointer-events: none;
}

body::before {
    width: 520px;
    height: 520px;
    top: 8%;
    left: -6%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 179, 116, 0.7), rgba(255, 120, 162, 0.32), transparent 55%);
    animation: orbDrift1 16s ease-in-out infinite alternate;
}

body::after {
    width: 620px;
    height: 620px;
    bottom: -10%;
    right: -8%;
    background: radial-gradient(circle at 60% 40%, rgba(94, 134, 255, 0.6), rgba(106, 69, 231, 0.38), transparent 60%);
    animation: orbDrift2 18s ease-in-out infinite alternate;
}
    
    /* 自定义滚动条样式 */
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
        transform: scale(1.1);
    }
    
    ::-webkit-scrollbar-corner {
        background: transparent;
    }
    
    /* Firefox滚动条样式 */
    * {
        scrollbar-width: thin;
        scrollbar-color: #667eea rgba(255, 255, 255, 0.05);
    }

.container {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(22px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow), var(--glow), 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 600px;
    width: 100%;
    height: calc(100vh - 48px);
    min-height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* 隐藏外层滚动条但保留滚动能力 */
body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.header {
    background: radial-gradient(circle at 25% 35%, rgba(255, 179, 116, 0.25), transparent 40%),
                linear-gradient(135deg, rgba(106, 69, 231, 0.92) 0%, rgba(38, 86, 243, 0.92) 60%, rgba(255, 79, 161, 0.9) 100%);
    color: white;
    padding: 36px 30px 28px;
    text-align: center;
}

.header h1 {
    font-size: 30px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.form-container {
    padding: 32px;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 26px;
    gap: 10px;
}

.step-item {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--muted);
    transition: all 0.25s ease;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.step-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border-color: transparent;
    color: #fff;
    box-shadow: var(--glow);
    transform: translateY(-1px);
}

.step-item.completed {
    background: rgba(14, 229, 138, 0.2);
    border-color: rgba(14, 229, 138, 0.6);
    color: #d7ffe9;
}

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

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

.form-group input, .form-group select {
            width: 100%;
            padding: 14px 16px;
            background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 15px;
            color: #ffffff;
            transition: all 0.25s ease;
            /* 允许输入框中的文本选择 */
            -webkit-user-select: text;
            -moz-user-select: text;
            -ms-user-select: text;
            user-select: text;
        }
        
        /* 选择框强制样式 */
        .form-group select {
            background: rgba(255, 255, 255, 0.04) !important;
            color: #ffffff !important;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
        }
        
        .form-group select:focus {
            background: rgba(255, 255, 255, 0.08) !important;
            color: #ffffff !important;
            outline: none;
            border-color: rgba(102, 126, 234, 0.5);
        }
        
        /* 选择框下拉选项完全重写 */
        .form-group select option {
            background: #1a1a2e !important;
            color: #ffffff !important;
            border: none !important;
            padding: 12px 16px !important;
            outline: none !important;
        }
        
        .form-group select option:hover {
            background: #667eea !important;
            color: #ffffff !important;
            border: none !important;
            outline: none !important;
        }
        
        .form-group select option:checked,
        .form-group select option:selected {
            background: #667eea !important;
            color: #ffffff !important;
            border: none !important;
            outline: none !important;
        }
        
        /* 移除所有白色边框和轮廓 - 强制覆盖 */
        .form-group select,
        .form-group select:focus,
        .form-group select:active,
        .form-group select:hover {
            outline: none !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
        }
        
        .form-group select:focus {
            border-color: #667eea !important;
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2) !important;
        }
        
        /* 强制覆盖浏览器默认样式 */
        select::-ms-expand {
            display: none;
        }
        
        select:focus::-ms-value {
            background: transparent !important;
            color: #ffffff !important;
        }
        
        /* 自定义下拉箭头 */
        .form-group select {
            background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23ffffff" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>') !important;
            background-repeat: no-repeat !important;
            background-position: right 12px center !important;
            background-size: 12px !important;
            padding-right: 40px !important;
        }
        
        .email-input-group {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
        }
        
        .email-input-group input {
             flex: 0 0 45%;
             width: auto;
         }
         
         .email-input-group .at-symbol {
              color: #e8edff;
              font-weight: 700;
              font-size: 18px;
              flex-shrink: 0;
              background: rgba(255, 255, 255, 0.08);
              padding: 8px 12px;
              border-radius: 6px;
              border: 1px solid var(--border);
              text-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
           }
         
         .email-input-group select {
              flex: 0 0 45%;
              width: auto;
              min-width: auto;
          }
          
          /* 移动端邮箱输入优化 - 输入框优先 */
              @media screen and (max-width: 580px) {
                  .email-input-group input {
                      flex: 0 0 55% !important;
                      width: 55% !important;
                      max-width: 55% !important;
                  }
                  
                  .email-input-group select {
                      flex: 0 0 35% !important;
                      width: 35% !important;
                      max-width: 35% !important;
                  }
              }
              
              @media screen and (max-width: 480px) {
                  .email-input-group input {
                      flex: 0 0 52% !important;
                      width: 52% !important;
                      max-width: 52% !important;
                  }
                  
                  .email-input-group select {
                      flex: 0 0 38% !important;
                      width: 38% !important;
                      max-width: 38% !important;
                  }
              }
              
              @media screen and (max-width: 400px) {
                  .email-input-group input {
                      flex: 0 0 50% !important;
                      width: 50% !important;
                      max-width: 50% !important;
                  }
                  
                  .email-input-group select {
                      flex: 0 0 40% !important;
                      width: 40% !important;
                      max-width: 40% !important;
                  }
              }

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(108, 138, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(108, 138, 255, 0.25), var(--glow);
}

.form-group select:focus {
    outline: none !important;
    border-color: rgba(108, 138, 255, 0.6) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 0 2px rgba(108, 138, 255, 0.25) !important;
}

.form-group select {
    cursor: pointer;
}

.btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 60%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--glow);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 35px rgba(108, 138, 255, 0.25);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.plan-info {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.plan-info h3 {
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.plan-info p {
    color: #b9c7e6;
    margin-bottom: 8px;
    line-height: 1.5;
}

.price {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 8px;
    text-shadow: 0 0 15px rgba(36, 216, 255, 0.35);
}

.error {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.tab-btn {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 10px 20px;
    margin: 0 4px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--glow);
}

.verification-input {
    display: flex;
    gap: 10px;
}

.verification-input input {
    flex: 1;
}

.send-code-btn {
    background: linear-gradient(135deg, #4da8ff, #1c6bf3);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 120px;
    transition: all 0.3s ease;
}

.send-code-btn:disabled {
    background: rgba(107, 114, 128, 0.5);
    cursor: not-allowed;
}

.loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: #e2e8f0;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes orbDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(12%, -10%) scale(1.06); }
}

@keyframes orbDrift2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-8%, 10%) scale(1.04); }
}

.plan-selector {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
}

@media screen and (max-width: 640px) {
    .plan-selector {
        max-height: 65vh;
    }
}

.plan-option {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.plan-option:hover {
    border-color: rgba(108, 138, 255, 0.6);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--glow);
}

.plan-option.selected {
    border-color: rgba(108, 138, 255, 0.9);
    background: linear-gradient(135deg, rgba(108, 138, 255, 0.12), rgba(36, 216, 255, 0.1));
    box-shadow: var(--glow);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-option h4 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    flex: 1;
}

.plan-option .plan-price {
    margin: 0;
    color: var(--accent);
    font-weight: 600;
    font-size: 16px;
    margin-right: 12px;
}

.expand-icon {
    color: #cbd5e1;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.plan-option.expanded .expand-icon {
    transform: rotate(180deg);
}

.plan-features {
    margin-top: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.plan-features.collapsed {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
}

.feature-line {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
    color: #e2e8f0;
    line-height: 1.4;
}

.check-icon {
    color: var(--success);
    font-weight: bold;
    margin-right: 8px;
    font-size: 12px;
    flex-shrink: 0;
}

.plan-actions {
    margin-top: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.plan-actions.collapsed {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
}

.select-plan-btn {
    background: linear-gradient(120deg, var(--primary), var(--primary-strong));
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
    width: 100%;
    box-shadow: var(--glow);
}

.select-plan-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(108, 138, 255, 0.25);
}

.feature-list {
    margin: 12px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #e2e8f0;
    font-size: 14px;
}

.feature-icon {
    width: 16px;
    height: 16px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.feature-icon::after {
    content: '✓';
    color: white;
    font-size: 10px;
    font-weight: bold;
}
