/* ========================================
   号卡系统标准版样式
   完全支持后台自定义颜色和阴影
   ======================================== */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: #333;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* 主色调定义（全部使用CSS变量，后台可修改） */
:root {
    --text-primary: #000000;
    --text-secondary: #999999;
    --border-radius: 16px;
}

/* ========================================
   轮播图样式
   ======================================== */
.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 20px;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-item {
    min-width: 100%;
    height: 160px;
}

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

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.slider-dot.active {
    background: white;
    width: 16px;
    border-radius: 3px;
}

/* ========================================
   搜索框样式
   ======================================== */
.search-input {
    border: 2px solid var(--primary);
    border-radius: 9999px;
    padding: 12px 20px;
    font-size: 18px;
    outline: none;
    background: white;
}

.search-btn {
    background: var(--primary);
    border-radius: 9999px;
    padding: 12px 28px;
    color: white;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

/* ========================================
   号码卡片样式（100%还原参考图）
   ======================================== */
.number-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 20px 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: var(--number-card-shadow); /* 使用后台设置的阴影 */
    border: none;
}

.number-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--number-card-shadow-hover); /* 悬浮阴影 */
}

.number-card .phone-number {
    font-size: 24px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 0;
}

.number-card .phone-number .prefix {
    color: var(--primary);
}

.number-card .location {
    font-size: 16px;
    color: var(--text-secondary);
    display: block;
}

.number-card .location::before {
    content: '';
}

/* ========================================
   套餐卡片样式
   ======================================== */
.package-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--package-card-shadow); /* 使用后台设置的阴影 */
}

.package-card:hover {
    box-shadow: var(--package-card-shadow-hover); /* 悬浮阴影 */
}

.package-card.active {
    border-color: var(--primary);
    background: #fff5f5;
}

.package-card .package-info .package-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.package-card .package-info .package-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.package-card .package-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.package-card .package-price .unit {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* ========================================
   底部导航样式
   ======================================== */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
}

.bottom-nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* ========================================
   弹窗样式
   ======================================== */
.modal-content {
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.3s ease;
    background: white;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #c41e3a;
}

.btn-default {
    background: white;
    color: var(--text-primary);
    border: 1px solid #e5e7eb;
}

.btn-default:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ========================================
   表单样式
   ======================================== */
.form-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.1);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* ========================================
   通用工具类
   ======================================== */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 16px;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mt-8 {
    margin-top: 32px;
}

.p-4 {
    padding: 16px;
}

.p-5 {
    padding: 20px;
}

.p-6 {
    padding: 24px;
}

.py-2 {
    padding-top: 8px;
    padding-bottom: 8px;
}

.py-3 {
    padding-top: 12px;
    padding-bottom: 12px;
}

.px-3 {
    padding-left: 12px;
    padding-right: 12px;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.rounded {
    border-radius: 4px;
}

.rounded-lg {
    border-radius: 8px;
}

.rounded-xl {
    border-radius: 12px;
}

.rounded-full {
    border-radius: 9999px;
}

.border {
    border: 1px solid #e5e7eb;
}

.border-b {
    border-bottom: 1px solid #e5e7eb;
}

.border-t {
    border-top: 1px solid #e5e7eb;
}

.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bg-white {
    background-color: var(--card-background);
}

.bg-gray-50 {
    background-color: #f9fafb;
}

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

.bg-primary\/10 {
    background-color: rgba(230, 0, 18, 0.1);
}

.bg-green-100 {
    background-color: #dcfce7;
}

.text-white {
    color: white;
}

.text-primary {
    color: var(--primary);
}

.text-gray-500 {
    color: var(--text-secondary);
}

.text-gray-600 {
    color: #666666;
}

.text-green-500 {
    color: #10b981;
}

.text-sm {
    font-size: 13px;
}

.text-lg {
    font-size: 16px;
}

.text-xl {
    font-size: 18px;
}

.text-2xl {
    font-size: 20px;
}

.text-3xl {
    font-size: 24px;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.font-mono {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.text-center {
    text-align: center;
}

.block {
    display: block;
}

.hidden {
    display: none;
}

.w-full {
    width: 100%;
}

.w-10 {
    width: 40px;
}

.w-16 {
    width: 64px;
}

.w-20 {
    width: 80px;
}

.w-48 {
    width: 192px;
}

.h-1 {
    height: 4px;
}

.h-10 {
    height: 40px;
}

.h-16 {
    height: 64px;
}

.h-20 {
    height: 80px;
}

.h-48 {
    height: 192px;
}

.min-h-screen {
    min-height: 100vh;
}

.object-cover {
    object-fit: cover;
}

.outline-none {
    outline: none;
}

.cursor-pointer {
    cursor: pointer;
}

.sticky {
    position: sticky;
}

.fixed {
    position: fixed;
}

.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

.top-0 {
    top: 0;
}

.bottom-0 {
    bottom: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.z-50 {
    z-index: 50;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.translate-y-1\/2 {
    transform: translateY(50%);
}

.-translate-y-1\/2 {
    transform: translateY(-50%);
}

.-translate-x-1\/2 {
    transform: translateX(-50%);
}

.max-w-sm {
    max-width: 384px;
}

.max-w-md {
    max-width: 448px;
}

.max-w-lg {
    max-width: 512px;
}

.max-w-xl {
    max-width: 576px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.overflow-hidden {
    overflow: hidden;
}

/* ========================================
   运营商筛选标签样式
   ======================================== */
.operator-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-secondary);
    border: none;
}

.operator-tag.active {
    background: var(--primary);
    color: white;
}

.operator-tag:hover {
    opacity: 0.9;
}

/* ========================================
   订单进度条样式
   ======================================== */
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-step .step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: #e5e7eb;
    color: var(--text-secondary);
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: var(--primary);
    color: white;
}

.progress-step .step-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-step.active .step-text {
    color: var(--primary);
    font-weight: 500;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 8px;
    align-self: center;
    transition: all 0.3s ease;
}

.progress-line.active {
    background: var(--primary);
}