* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    color: #333;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    width: 100%;
    max-width: 400px;
    text-align: center;
    border-radius: 16px;
    padding: 24px;
}

.card-wide {
    max-width: 960px;
}

.logo-wrap {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.logo-wrap .netdisk-logo,
.logo-wrap img.netdisk-logo {
    width: 64px;
    height: 64px;
    display: block;
    object-fit: contain;
    border-radius: 14px;
}

.logo {
    font-size: 64px;
    line-height: 1;
}

.title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
}

.subtitle {
    margin: 0 0 32px;
    color: #888;
    line-height: 1.6;
}

.content {
    width: 100%;
}

.content-multi {
    display: flex;
    flex-direction: column;
    gap: 28px;
    text-align: left;
}

.main-area {
    min-width: 0;
}

.main-area-multi {
    display: flex;
    justify-content: center;
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.content-multi .download-list,
.download-list-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.download-btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 25px;
    height: 50px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
}

.download-btn-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
}

.download-btn-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-btn-logo .netdisk-logo,
.download-btn-logo img.netdisk-logo {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.download-btn-text {
    line-height: 1.4;
}

.download-card {
    background: #fff;
    color: #333;
    border: 1px solid #eee !important;
    border-radius: 12px;
    height: auto;
    min-height: 48px;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.download-card .download-btn-inner {
    justify-content: flex-start;
    width: auto;
}

.download-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.qr-wrap {
    display: inline-block;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: inset 0 0 10px -5px rgba(0, 0, 0, 0.75);
    line-height: 0;
}

.traffic-section,
.traffic-grid-wrap {
    margin-top: 24px;
    text-align: left;
}

.content-multi .traffic-grid-wrap {
    margin-top: 0;
    border-top: 1px solid #eee;
    padding-top: 24px;
}

.traffic-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
    padding-left: 4px;
}

.traffic-grid {
    column-count: 3;
    column-gap: 12px;
}

.traffic-grid .traffic-card {
    break-inside: avoid;
    margin-bottom: 12px;
}

.traffic-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.traffic-card-with-image {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

.traffic-card-image-large {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.traffic-cover {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #eee;
    background: #fafafa;
}

.traffic-cover-large {
    width: 100%;
    height: auto;
    max-height: 160px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
}

.traffic-card-body {
    min-width: 0;
    flex: 1;
}

.traffic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.traffic-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    word-break: break-word;
}

.traffic-desc {
    font-size: 12px;
    color: #888;
    word-break: break-word;
}

.modal.hidden { display: none; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.modal-body {
    position: relative;
    z-index: 1;
    width: min(92vw, 360px);
    margin: 10vh auto 0;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.modal-tip {
    color: #888;
    margin: 0 0 16px;
}

.modal-close {
    margin-top: 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
}

@media (min-width: 769px) {
    .main-area:not(.main-area-multi) {
        display: flex;
        justify-content: center;
    }

    .download-list {
        width: auto;
        max-width: 100%;
    }

    .download-btn {
        width: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 20px;
    }

    .download-card {
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
    }

    .content-multi .download-card {
        flex: 0 1 auto;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .traffic-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .traffic-grid {
        column-count: 1;
    }
}
