* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f1f5f9;
    -webkit-font-smoothing: antialiased;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
}

.page-title {
    flex-shrink: 0;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    padding: 16px 16px 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #0f172a;
}

.type-filter {
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 0 16px 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    scrollbar-width: none;
}

.type-filter::-webkit-scrollbar {
    display: none;
}

.type-filter button {
    flex-shrink: 0;
    padding: 6px 14px;
    border: none;
    border-radius: 20px;
    background: #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.type-filter button.active,
.type-filter button:hover {
    background: #3b82f6;
    color: #fff;
}

.links-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    padding: 14px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}

.link-card:active {
    transform: scale(0.99);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    overflow: hidden;
    margin-right: 14px;
    flex-shrink: 0;
    background: #f1f5f9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.card-info {
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-platform {
    display: inline-block;
    padding: 2px 8px;
    background: #e2e8f0;
    color: #475569;
    border-radius: 10px;
    font-size: 12px;
    margin-top: 4px;
}

.card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.card-time {
    font-size: 12px;
    color: #94a3b8;
}

.download-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.download-btn:active {
    background: #2563eb;
    transform: none;
    outline: none;
}

button {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

button:focus,
button:focus-visible {
    outline: none;
    box-shadow: none;
}

.footer {
    flex-shrink: 0;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.footer p {
    margin-bottom: 4px;
    line-height: 1.4;
}

.loading,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.qr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.qr-container {
    background: #fff;
    padding: 36px 28px;
    border-radius: 32px;
    text-align: center;
    max-width: 360px;
}

.qr-container h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}

.qr-container p {
    color: #475569;
    margin-bottom: 24px;
    font-size: 15px;
}

.qr-container #qrcode {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    background: #fff;
    padding: 10px;
    border-radius: 16px;
}

.qr-container #qrcode img {
    display: block;
    border-radius: 8px;
}

.qr-url {
    font-size: 13px;
    color: #64748b;
    word-break: break-all;
    background: #f1f5f9;
    padding: 10px 12px;
    border-radius: 12px;
    margin-top: 16px;
}

@media (max-width:480px) {
    .page-title {
        font-size: 20px;
        padding: 16px 12px 8px;
    }

    .card-thumbnail {
        width: 50px;
        height: 50px;
    }
}