/* 主样式文件 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    overflow: hidden;
    background: #ffffff;
    color: #333;
}

.app-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* 顶部导航栏 */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 100;
}

.logo {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.nav-center {
    display: flex;
    align-items: center;
}

.signal-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #666;
}

.signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b35;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.nav-right {
    display: flex;
    gap: 12px;
}

.nav-btn {
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-btn-hidden {
    display: none;
}

.nav-btn-primary {
    padding: 10px 24px;
    border: 2px solid #ff6b35;
    background: #ff6b35;
    color: white;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-btn-primary:hover {
    background: #ff5520;
    border-color: #ff5520;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* 搜索框 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 180px;
    padding: 8px 32px 8px 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    width: 200px;
    border-color: #ff6b35;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.search-box input::placeholder {
    color: #999;
}

/* 清除按钮 */
.search-clear {
    position: absolute;
    right: 8px;
    width: 18px;
    height: 18px;
    line-height: 16px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.search-clear.visible {
    display: flex;
}

/* 无结果提示 */
.search-no-result {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s;
    pointer-events: none;
    z-index: 101;
}

.search-no-result.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 左侧文案区 */
.sidebar {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 320px;
    z-index: 90;
}

.sidebar-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    color: #000;
    margin-bottom: 16px;
}

.sidebar-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 32px;
}

.drag-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
}

.drag-hint span {
    font-size: 11px;
    letter-spacing: 1px;
    color: #666;
}

/* 3D 画布容器 */
.canvas-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* 悬停卡片 */
.hover-card {
    position: fixed;
    width: 280px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.hover-card.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f7f8fb 0%, #eef1f6 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.card-image img[data-image-fit="contain"] {
    object-fit: contain;
    padding: 10px;
}

.card-content {
    padding: 16px;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}

.card-location {
    font-size: 13px;
    color: #999;
    margin-bottom: 4px;
}

.card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 12px;
}

.card-story {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: min(800px, calc(100vw - 32px));
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding: 40px;
}

.modal-image {
    flex: 0 0 min(360px, 36vw);
    width: min(360px, 36vw);
    max-width: 360px;
    min-height: 260px;
    max-height: calc(90vh - 120px);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(180deg, #f7f8fb 0%, #eef1f6 100%);
}

.modal-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(90vh - 152px);
    display: block;
    object-fit: contain;
}

.modal-image img[data-image-fit="contain"] {
    object-fit: contain;
}

.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-info h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-location {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.modal-tag {
    padding: 6px 14px;
    background: rgba(78, 205, 196, 0.1);
    color: #4ecdc4;
    border-radius: 14px;
    font-size: 13px;
}

.modal-story {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 32px;
    flex: 1;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #ff6b35;
    background: white;
    color: #ff6b35;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.like-btn:hover {
    background: #ff6b35;
    color: white;
}

.like-btn.liked {
    background: #ff6b35;
    color: white;
}

.like-icon {
    font-size: 20px;
}

.detail-btn {
    flex: 1;
    padding: 12px 24px;
    border: 2px solid #333;
    background: #333;
    color: white;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.detail-btn:hover {
    background: #000;
    border-color: #000;
}

.detail-btn-hidden {
    display: none;
}

/* 发射表单 */
.launch-form {
    width: 500px;
    padding: 20px 0;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
}

.form-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    line-height: 1.5;
}

.form-counter {
    float: right;
    font-variant-numeric: tabular-nums;
}

.form-counter.is-limit {
    color: #ff6b35;
    font-weight: 600;
}

.upload-preview-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: #fafafa;
}

.upload-preview-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 10px;
    background: linear-gradient(180deg, #f7f8fb 0%, #eef1f6 100%);
    padding: 6px;
    flex-shrink: 0;
}

.upload-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-preview-meta strong {
    font-size: 14px;
    color: #222;
}

.upload-preview-meta span {
    font-size: 12px;
    color: #999;
}

.upload-status {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 107, 53, 0.08);
}

.upload-status-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.upload-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.upload-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff6b35 0%, #ff8f63 100%);
    transition: width 0.2s ease;
}

.upload-status-detail {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    min-height: 18px;
}

.upload-action-row {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.secondary-btn {
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    background: white;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    border-color: rgba(255, 107, 53, 0.4);
    color: #ff6b35;
}

.secondary-btn:disabled,
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: #ff6b35;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background: #ff5520;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* 底部筛选栏 */
.filter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 100;
}

.filter-categories {
    display: flex;
    gap: 12px;
}

.filter-categories-hidden {
    display: none;
}

.filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn .filter-icon {
    font-size: 24px;
}

.filter-btn span:last-child {
    font-size: 12px;
    color: #666;
}

.filter-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.filter-btn.active {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
}

.filter-btn.active span:last-child {
    color: #ff6b35;
    font-weight: 600;
}

.signal-counter {
    font-size: 12px;
    letter-spacing: 1px;
    color: #999;
    font-weight: 500;
}

.signal-counter span {
    color: #ff6b35;
    font-weight: 700;
}

.group-qr-entry {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-qr-box {
    width: 92px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.group-qr-box img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    border-radius: 0;
}

.group-qr-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.group-qr-copy strong {
    font-size: 13px;
    color: #333;
}

.group-qr-copy span {
    font-size: 12px;
    color: #999;
}

/* 响应式 */
@media (max-width: 768px) {
    .navigation {
        padding: 0 20px;
        height: 60px;
    }

    .logo {
        font-size: 14px;
    }

    .nav-btn {
        display: none;
    }

    .search-box {
        display: none;
    }

    .nav-btn-primary {
        font-size: 12px;
        padding: 8px 16px;
    }

    .sidebar {
        left: 20px;
        max-width: 260px;
    }

    .sidebar-title {
        font-size: 24px;
    }

    .modal-body {
        flex-direction: column;
        padding: 20px;
    }

    .modal-image {
        width: 100%;
        max-width: none;
        min-height: 220px;
        max-height: 300px;
        padding: 12px;
    }

    .modal-image img {
        max-height: 276px;
    }

    .launch-form {
        width: 100%;
    }

    .filter-bar {
        padding: 0 20px;
        height: 84px;
        justify-content: space-between;
    }

    .filter-btn {
        padding: 6px 10px;
    }

    .filter-btn .filter-icon {
        font-size: 20px;
    }

    .filter-btn span:last-child {
        font-size: 10px;
    }

    .group-qr-entry {
        gap: 8px;
    }

    .group-qr-box {
        width: 72px;
        height: 72px;
    }

    .group-qr-copy strong {
        font-size: 12px;
    }

    .group-qr-copy span {
        display: none;
    }
}
/* 太极 Loading 动画样式 */

.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader-container.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* 两个带拖尾的圆点，像太极一样绕中心旋转 */
.taichi-loader {
    position: relative;
    width: 96px;
    height: 96px;
    animation: rotate 1.8s linear infinite;
    filter: drop-shadow(0 0 12px rgba(255, 107, 53, 0.12));
}

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

.taichi-loader::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transform: translate(-50%, -50%) translateY(-30px);
    background: #2f2f2f;
    box-shadow:
        0 0 0 1px rgba(47, 47, 47, 0.06),
        0 10px 0 -3px rgba(47, 47, 47, 0.18),
        0 18px 0 -6px rgba(47, 47, 47, 0.1),
        0 24px 0 -8px rgba(47, 47, 47, 0.06);
}

.taichi-loader::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transform: translate(-50%, -50%) translateY(30px);
    background: #ff6b35;
    box-shadow:
        0 -10px 0 -3px rgba(255, 107, 53, 0.22),
        0 -18px 0 -6px rgba(255, 107, 53, 0.12),
        0 -24px 0 -8px rgba(255, 107, 53, 0.06);
}

.taichi-loader::before,
.taichi-loader::after {
    animation: pulse-tail 1.8s ease-in-out infinite;
}

@keyframes pulse-tail {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.78;
    }
}

/* 中心柔和光晕 */
.loader-container::before {
    content: '';
    position: absolute;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, rgba(255, 107, 53, 0.03) 42%, rgba(255, 107, 53, 0) 72%);
    pointer-events: none;
}

.taichi-loader,
.loading-progress {
    position: relative;
    z-index: 1;
}

/* 进度文字 */
.loading-progress {
    margin-top: 28px;
    font-size: 12px;
    color: #a0a0a0;
    font-weight: 500;
    letter-spacing: 3px;
}

#loading-percent {
    color: #ff6b35;
    font-weight: 700;
    font-size: 16px;
}
