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

:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent-color: #f472b6;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --glass-blur: blur(20px);
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: rgba(255, 255, 255, 0.9);
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 50px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* 动态背景 */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -3;
}

.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #5f27cd, #48dbfb);
    bottom: 10%;
    left: -50px;
    animation-delay: -7s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #ff9ff3, #54a0ff);
    top: 40%;
    right: 20%;
    animation-delay: -14s;
}

.orb-4 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    bottom: -50px;
    left: 30%;
    animation-delay: -21s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 主容器 */
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Liquid Glass 卡片 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 
        var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    padding: 30px;
    animation: slideUp 0.5s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.glass-inner {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 头部 */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header h1 i {
    margin-right: 10px;
}

header .subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

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

.header-top h2 {
    font-size: 24px;
    color: var(--text-light);
    flex: 1;
}

.header-top h2 i {
    margin-right: 8px;
}

/* 按钮样式 */
.glass-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.glass-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.glass-btn:hover::before {
    left: 100%;
}

.glass-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.3);
}

.glass-btn:active {
    transform: translateY(-1px);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.primary-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    box-shadow: 
        0 8px 30px rgba(99, 102, 241, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 4px 20px rgba(99, 102, 241, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 4px 30px rgba(99, 102, 241, 0.6),
            0 0 40px rgba(99, 102, 241, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.icon-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* 位置获取区域 */
.location-content {
    text-align: center;
    padding: 20px 0;
}

.location-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.location-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* 加载动画 */
.loading-content {
    text-align: center;
    padding: 40px 0;
}

.liquid-loader {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.liquid-blob {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    animation: liquidBounce 1.4s infinite ease-in-out;
}

.liquid-blob:nth-child(1) {
    animation-delay: -0.32s;
}

.liquid-blob:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes liquidBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.loading-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

/* 餐馆列表区域 */
.restaurant-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 0;
}

.main-action {
    text-align: center;
    margin-top: 20px;
}

/* 餐厅网格布局 */
.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 5px;
}

.restaurant-grid::-webkit-scrollbar {
    width: 6px;
}

.restaurant-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.restaurant-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* 餐厅卡片样式 */
.restaurant-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restaurant-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.restaurant-card.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(244, 114, 182, 0.3));
    border-color: rgba(99, 102, 241, 0.5);
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}

.restaurant-card.selected {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.3), rgba(99, 102, 241, 0.3));
    border-color: var(--success-color);
    transform: scale(1.02);
    box-shadow: 0 5px 25px rgba(52, 211, 153, 0.4);
}

.card-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(244, 114, 182, 0.3));
}

.card-image-placeholder {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(244, 114, 182, 0.3));
    font-size: 40px;
    color: rgba(255, 255, 255, 0.5);
}

.card-content {
    padding: 12px;
}

.card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.card-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.card-rating {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.card-rating i {
    font-size: 9px;
}

.card-cost {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.card-cost i {
    font-size: 9px;
}

.card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.card-info span {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.card-info i {
    font-size: 10px;
    flex-shrink: 0;
}

.card-tag {
    background: rgba(99, 102, 241, 0.3);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
}
}

.item-info i {
    font-size: 12px;
}

/* 跑马灯区域 */
.marquee-container {
    text-align: center;
}

.marquee-header {
    margin-bottom: 25px;
}

.marquee-header h2 {
    font-size: 22px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.timer-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.timer-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.marquee-viewport {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.marquee-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    transition: all 0.15s ease;
    animation: marqueePulse 0.3s ease;
}

@keyframes marqueePulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

.marquee-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.marquee-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marquee-image .card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(244, 114, 182, 0.4));
    font-size: 50px;
    color: rgba(255, 255, 255, 0.6);
}

.marquee-info {
    padding: 15px;
}

.marquee-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marquee-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.marquee-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
    font-size: 14px;
}

.marquee-indicator i {
    font-size: 24px;
    animation: spinDice 0.5s linear infinite;
}

@keyframes spinDice {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 结果展示区域 */
.result-header {
    text-align: center;
    margin-bottom: 20px;
}

.confetti-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4);
    animation: celebrateIcon 0.6s ease;
}

@keyframes celebrateIcon {
    0% {
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.result-header h2 {
    font-size: 26px;
    color: var(--text-light);
}

.restaurant-detail {
    margin-bottom: 20px;
}

.detail-card {
    padding: 0;
    overflow: hidden;
}

.result-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-image .card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(244, 114, 182, 0.4));
    font-size: 60px;
    color: rgba(255, 255, 255, 0.6);
}

.result-content {
    padding: 20px;
}

.restaurant-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
}

.result-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 600;
}

.cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.info-row i {
    width: 18px;
    color: var(--primary-light);
    margin-top: 2px;
    flex-shrink: 0;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.navigate-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--success-color), #10b981);
    border: none;
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.4);
}

.navigate-btn:hover {
    background: linear-gradient(135deg, #10b981, var(--success-color));
    box-shadow: 0 8px 30px rgba(52, 211, 153, 0.5);
}

.retry-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
}

.back-link {
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: white;
}

.back-link i {
    margin-right: 5px;
}

/* 错误区域 */
.error-content {
    text-align: center;
    padding: 30px 0;
}

.error-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--error-color), #ef4444);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 10px 30px rgba(248, 113, 113, 0.4);
}

.error-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 25px;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .glass-card {
        padding: 25px 20px;
        border-radius: var(--radius-md);
    }
    
    header h1 {
        font-size: 28px;
    }
    
    .glass-btn {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .restaurant-list {
        max-height: 350px;
    }
    
    .marquee-card {
        max-width: 100%;
    }
    
    .marquee-image {
        height: 120px;
    }
    
    .result-image {
        height: 150px;
    }
}

/* 小屏幕手机适配 */
@media (max-width: 360px) {
    .container {
        padding: 10px;
    }
    
    .glass-card {
        padding: 20px 15px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .glass-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .restaurant-grid {
        grid-template-columns: 1fr;
    }
    
    .marquee-image {
        height: 100px;
    }
    
    .marquee-info h3 {
        font-size: 16px;
    }
    
    .result-image {
        height: 120px;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

/* 平板适配 */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
    }
    
    .restaurant-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .marquee-card {
        max-width: 350px;
    }
    
    .marquee-image {
        height: 180px;
    }
    
    .result-image {
        height: 220px;
    }
}
