/**
 * DIY手串设计页面 - 增强版CSS样式
 * 支持数据联动和现代化界面设计
 */

/* 数据联动指示器样式 */
.sync-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    z-index: 2000;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sync-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.sync-content i {
    font-size: 18px;
    animation: spin 1s linear infinite;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 2001;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 珠子选择动画 */
.ornament.selected {
    animation: bead-select 0.3s ease-out;
}

@keyframes bead-select {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 预览区域样式 */
#previewArea {
    position: relative;
    width: 400px;
    height: 400px;
    
    border-radius: 50%;
    /*
    margin: 20px auto;
    border: 2px solid #e0e0e0;
    background: radial-gradient(circle, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    */
    /* 移除overflow: hidden，让珠子飞入动画可见 */
    /*
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    */
}

#ring {
    position: absolute;
    border: 2px solid #333;
    border-radius: 50%;
    pointer-events: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

#beadLayer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

#beadLayer .bead {
    pointer-events: auto;
    animation: beadAppear 0.5s ease-out;
    transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#beadLayer .bead img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*border-radius: 50%;*/
    transition: all 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
}

#beadLayer .bead:hover img {
    transform: scale(1.05);
}

/* 拖拽状态样式 */
#beadLayer .bead.dragging {
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transform: scale(1.1);
    transition: none;
}

#beadLayer .bead.dragging img {
    opacity: 0.8;
}

@keyframes beadAppear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2) rotate(90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.bead.squeezed {
    animation: beadSqueeze 0.6s ease-in-out;
}

@keyframes beadSqueeze {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

/* 预览珠子样式 */
.preview-bead {
    position: absolute;
    width: 40px;
    height: 40px;
    /*border-radius: 50%;*/
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    overflow: hidden;
}

.preview-bead:hover {
    transform: scale(1.2);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.preview-bead.full-bracelet {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.preview-bead img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*border-radius: 50%;*/
}

/* 珠子信息显示 */
.bead-info {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.preview-bead:hover .bead-info {
    opacity: 1;
}

.bead-name {
    display: block;
    font-weight: 500;
    margin-bottom: 2px;
}

.bead-size {
    display: block;
    font-size: 9px;
    opacity: 0.8;
}

/* 手串状态显示 */
.bracelet-status {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.status-info .label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.status-info .value {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.capacity-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.capacity-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.5s ease;
    border-radius: 4px;
}

.capacity-text {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    min-width: 40px;
    text-align: center;
}

/* 手串已满提示 */
.full-bracelet-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
    z-index: 2000;
    backdrop-filter: blur(10px);
    animation: messagePopIn 0.5s ease-out;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
}

.message-content i {
    font-size: 20px;
    color: #ffffff;
}

@keyframes messagePopIn {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 珠子飞入动画 */
.preview-bead.flying,
#beadLayer .bead.flying {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 飞入动画的缓动效果 */
#beadLayer .bead.flying {
    animation: flyIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes flyIn {
    0% {
        transform: translate(-50%, -50%) scale(0.8) rotate(180deg);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(90deg);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

.preview-bead.bouncing {
    transition: transform 0.3s ease-out;
}

.preview-bead.compressing {
    transition: transform 0.5s ease-out;
    transform: translate(-50%, -50%) scale(0.9) !important;
}

/* 珠子选择时的反馈动画 */
.ornament.selected {
    animation: beadSelect 0.3s ease-out;
}

@keyframes beadSelect {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 手串预览区域增强 */
#bracelet-preview {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

#bracelet-preview:hover {
    border-color: #007bff;
    background: radial-gradient(circle, #f0f8ff 0%, #e6f3ff 100%);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

/* 手串周长指示器 */
.bracelet-circumference {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.bracelet-circumference svg {
    filter: drop-shadow(0 2px 4px rgba(0, 123, 255, 0.2));
}

/* 珠子选择提示 */
.bead-selection-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
    animation: hintSlideUp 0.5s ease-out;
}

@keyframes hintSlideUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* 珠子添加到预览的动画 */
@keyframes beadAdd {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3) rotate(90deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 珠子点击反馈动画 */
.ornament {
    transition: all 0.3s ease;
    cursor: pointer;
}

.ornament:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ornament:active {
    transform: scale(0.95);
}

/* 珠子信息样式 */
.ornament-info {
    /*position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    opacity: 0;
    padding: 4px 8px;
    */
    
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 15;
}

.ornament:hover .ornament-info {
    opacity: 1;
}

.ornament-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.ornament-price {
    color: #fbbf24;
}

/* 标签页切换动画 */
.van-tab__panel {
    transition: opacity 0.3s ease;
}

.van-tab__panel:not([style*="display: none"]) {
    opacity: 1;
}

/* 步骤切换动画 */
.van-step {
    transition: all 0.3s ease;
}

.van-step--process {
    transform: scale(1.05);
}

/* 统计数字动画 */
#selected-count,
#total-price {
    transition: all 0.3s ease;
}

#selected-count.updated,
#total-price.updated {
    animation: number-update 0.5s ease-out;
}

@keyframes number-update {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 数据加载状态 */
.data-loading {
    position: relative;
    min-height: 200px;
}

.data-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.data-loading::after {
    content: '正在加载数据...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    font-size: 14px;
    color: #6c757d;
}

/* 数据同步状态指示 */
.data-sync-status {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1000;
    transition: all 0.3s ease;
}

.data-sync-status.syncing {
    background: #3b82f6;
    color: white;
}

.data-sync-status.synced {
    background: #10b981;
    color: white;
}

.data-sync-status.error {
    background: #ef4444;
    color: white;
}

/* 响应式设计增强 */
@media (max-width: 480px) {
    .sync-indicator {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .sync-content {
        gap: 8px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        font-size: 12px;
    }
    
    .bead-details {
        flex-direction: column;
        gap: 12px;
    }
    
    .bead-image img {
        width: 60px;
        height: 60px;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .sync-indicator {
        border: 2px solid currentColor;
    }
    
    .notification {
        border: 2px solid currentColor;
    }
    
    .ornament-info {
        border: 1px solid currentColor;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .sync-indicator,
    .ornament,
    .van-tab,
    .van-step,
    .preview-bead {
        animation: none;
        transition: none;
    }
    
    .sync-content i {
        animation: none;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .sync-indicator {
        background: rgba(255, 255, 255, 0.9);
        color: #000;
    }
    
    .notification {
        background: rgba(255, 255, 255, 0.9);
        color: #000;
    }
    
    .ornament-info {
        background: rgba(255, 255, 255, 0.9);
        color: #000;
    }
}

/* 数据联动状态指示器 */
.data-sync-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
}

.data-sync-indicator.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 珠子网格布局优化 */
.ornament-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 12px;
    padding: 16px 0;
}

@media (max-width: 480px) {
    .ornament-list {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 8px;
    }
}

/* 筛选面板增强 */
.filter-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
}

.filter-panel:hover {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 控制按钮增强 */
.van-button {
    position: relative;
    overflow: hidden;
}

.van-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.van-button:active::before {
    width: 100px;
    height: 100px;
}

/* 标签页增强 */
.van-tabs__nav {
    position: relative;
    overflow: hidden;
}

.van-tabs__line {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: #000;
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* 步骤选择增强 */
.van-steps__items {
    position: relative;
}

.van-step {
    position: relative;
    z-index: 1;
}

.van-step--process {
    z-index: 2;
}

.van-step__line {
    position: relative;
    z-index: 0;
}

/* 模态框增强 */
.modal-content {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* 数据同步进度条 */
.sync-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e9ecef;
    z-index: 2002;
}

.sync-progress-bar {
    height: 100%;
    background: #000;
    width: 0%;
    transition: width 0.3s ease;
}

/* 数据状态指示器 */
.data-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    display: none;
}

.data-status.show {
    display: block;
}

.data-status.success {
    background: rgba(16, 185, 129, 0.9);
}

.data-status.error {
    background: rgba(239, 68, 68, 0.9);
}

.data-status.warning {
    background: rgba(245, 158, 11, 0.9);
}

.preview {
    position: relative;
    width: 400px;
    height: 400px;
    margin: auto;
    transition: transform 0.5s ease;
  }
  .ring {
    position: absolute;
    border: 2px solid black;
    /*border-radius: 50%;*/
    pointer-events: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
  }
  #beadLayer {
    position: absolute;
    inset: 0;
  }
  /*
  .bead {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: left 0.5s ease, top 0.5s ease;
    cursor: grab;
  }
  */
  .bead:active {
    cursor: grabbing;
  }
  /* 移除删除按钮样式 */
  /*
  .bead:hover::after {
    content: "✖";
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    font-size: 12px;
    border-radius: 50%;
    padding: 2px;
    cursor: pointer;
  }
  */
  .palette img {
    width: 40px;
    height: 40px;
    cursor: pointer;
    margin: 0 5px;
  }
  #reserve {
    margin-top: 20px;
    min-height: 60px;
    border: 1px dashed #ccc;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
  }
  #reserve .bead {
    position: relative;
    transform: none;
    transition: none;
    cursor: grab;
  }
  /*
  #reserve .bead:hover::after {
    content: "✖";
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    font-size: 12px;
    border-radius: 50%;
    padding: 2px;
    cursor: pointer;
  }
  */
  button { margin: 5px; }
  
  /* 挤压提示动画 */
  @keyframes squeezeHint {
    0% { transform: scale(1); }
    30% { transform: scale(1.2); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
  }
  .bead.squeezed {
    /*animation: squeezeHint 0.6s ease;*/
    transform: scale(0.95); transition: 0.3s;
  }

  
  
  /* 剩余空间进度条 */
  #spaceInfo {
    margin-top: 15px;
  }
  #spaceBar {
    width: 300px;
    height: 15px;
    border: 1px solid #999;
    margin: 5px auto;
    position: relative;
    background: #f0f0f0;
    border-radius: 8px;
  }
  #spaceFill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #4caf50;
    border-radius: 8px;
    transition: width 0.3s ease;
  }
  
  #modeStatus {
    margin-left: 10px;
    font-weight: bold;
    color: #007BFF;
  }
  
  #rotateControl {
    margin-top: 10px;
  }

  .bead-ghost {
  opacity: 0.4;
  border: 2px dashed #999;
}
.bead-ghost { opacity: 0.4; border: 2px dashed #999; border-radius: 50%; }
.bead-chosen { transform: scale(1.2); z-index: 2000; }
.bead-drag { opacity: 0.8; }

/* 认证弹窗样式 */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 0, 0, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.auth-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    padding: 0;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-modal-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 24px 32px 0;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.auth-modal-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    display:none;
}

.auth-modal-logo svg {
    filter: drop-shadow(0 2px 4px rgba(0, 123, 255, 0.2));
}

.auth-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: rgba(108, 117, 125, 0.1);
}

.auth-modal-close:hover {
    color: #495057;
    background: rgba(108, 117, 125, 0.2);
    transform: scale(1.1);
}

.auth-form {
    display: none;
    text-align: center;
}

.auth-form.active {
    display: block;
}

.auth-form-header {
    padding: 32px 32px 24px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.auth-form-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    letter-spacing: -0.5px;
}

.auth-form-header p {
    margin: 0;
    color: #6c757d;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
}

.auth-form-body {
    padding: 0 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
    display: flex !important;
    align-items: center;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-weight: 400;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.input-group input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 16px;
    color: #6c757d;
    pointer-events: none;
    z-index: 1;
}

.auth-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.auth-btn.primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.auth-btn.primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.auth-btn.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn.secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.auth-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 18px;
}

.auth-form-footer {
    padding: 0 32px 32px;
    background: #ffffff;
}

.auth-switch {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    font-weight: 400;
}

.auth-switch a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.auth-switch a:hover {
    color: #0056b3;
}

.auth-switch a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    transition: width 0.3s ease;
}

.auth-switch a:hover::after {
    width: 100%;
}

/* 匿名下单选项样式 */
.anonymous-order-section {
    padding: 24px 32px 32px;
    border-top: 1px solid #f1f3f4;
    text-align: center;
    background: #fafbfc;
}

.divider {
    position: relative;
    margin-bottom: 24px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    z-index: 1;
}

.divider span {
    background: #fafbfc;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    letter-spacing: 1px;
}

.anonymous-note {
    margin: 12px 0 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    font-weight: 400;
}

/* 动画效果 */
@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.auth-modal-content {
    animation: fadeInModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form.active {
    animation: slideIn 0.3s ease-out;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .auth-modal-content {
        width: 95%;
        max-width: none;
        /*margin: 20px;*/
        border-radius: 16px;
    }
    
    .auth-modal-header {
        padding: 20px 24px 0;
    }
    
    .auth-form-header {
        padding: 24px 24px 20px;
    }
    
    .auth-form-header h2 {
        font-size: 24px;
    }
    
    .auth-form-header p {
        font-size: 14px;
    }
    
    .auth-form-body {
        padding: 0 24px 20px;
        gap: 16px;
    }
    
    .input-group input {
        padding: 14px 14px 14px 44px;
        font-size: 15px;
    }
    
    .input-icon {
        left: 14px;
        font-size: 14px;
    }
    
    .auth-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .auth-form-footer {
        padding: 0 24px 24px;
    }
    
    .anonymous-order-section {
        padding: 20px 24px 24px;
    }
    
    .anonymous-note {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .auth-modal-content {
        width: 98%;
        margin: 10px;
    }
    
    .auth-form-header h2 {
        font-size: 22px;
    }
    
    .input-group input {
        padding: 12px 12px 12px 40px;
    }
    
    .input-icon {
        left: 12px;
    }
    
    .auth-btn {
        padding: 12px 16px;
    }
}
