* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --success: #10b981;
    --card-bg: rgba(255, 255, 255, 0.92);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, system-ui, sans-serif;
    background: var(--bg-gradient);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.5s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-text h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-text p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.sort-controls {
    display: flex;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sort-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sort-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-selector {
    position: relative;
}

.theme-toggle {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 200px;
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.theme-dropdown.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.theme-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}


.filter-sidebar {
    position: fixed;
    left: -350px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    padding: 2rem;
    transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-sidebar::-webkit-scrollbar {
    display: none;
}

.filter-sidebar.active {
    left: 0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.filter-header h3 {
    font-size: 1.4rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-header h3 i {
    color: var(--primary);
}

.close-filter {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.close-filter:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--dark);
}

.filter-group {
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-group h4 {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group h4 i {
    color: var(--primary);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(99, 102, 241, 0.05);
}

.filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.filter-option label {
    cursor: pointer;
    color: var(--dark);
    font-weight: 500;
    flex-grow: 1;
}

.filter-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.icon-dev {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.icon-office {
    background: linear-gradient(135deg, #06b6d4, #0ea5e9);
}

.icon-design {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.icon-productivity {
    background: linear-gradient(135deg, #10b981, #14b8a6);
}

.icon-all {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

.icon-security {
        background: linear-gradient(135deg, #ef4444, #dc2626);
    }

.icon-other {
    background: linear-gradient(135deg, #334155, #475569);
}


main {
    padding: 3rem 0;
}

.page-title {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title h2 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-title p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.tool-card-header {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.tool-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tool-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tool-card:hover .tool-card-image {
    transform: scale(1.05);
}

.tool-card-body {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tool-card-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--dark);
}

.tool-card-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.tool-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.tool-card-actions {
    display: flex;
    gap: 0.8rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    flex: 1;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}


.pagination-container {
    margin-top: 3rem;
    text-align: center;
    padding: 1.5rem 0;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pagination-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-pages {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.page-btn.active,
.page-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.pagination-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}


body.white-theme .pagination-btn,
body.light-theme .pagination-btn,
body.white-theme .page-btn,
body.light-theme .page-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--dark);
}

body.white-theme .pagination-btn:hover:not(:disabled),
body.light-theme .pagination-btn:hover:not(:disabled),
body.white-theme .page-btn:hover,
body.light-theme .page-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.white-theme .page-btn.active,
body.light-theme .page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

body.white-theme .pagination-info,
body.light-theme .pagination-info {
    color: var(--gray);
}


@media (max-width: 768px) {
    .pagination-controls {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .pagination-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .page-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .pagination-pages {
        order: -1;
        width: 100%;
        justify-content: center;
    }
}


.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    position: relative;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.modal-header p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.modal-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.storage-options {
    margin-bottom: 1.5rem;
}

.storage-options h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.storage-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.storage-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.storage-item:hover {
    background: #f1f5f9;
    transform: translateX(3px);
}

.storage-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    font-weight: bold;
}

.baidu {
    background: linear-gradient(135deg, #2932e1, #1a22c1);
}

.aliyun {
    background: linear-gradient(135deg, #ff6a00, #ff3d00);
}

.onedrive {
    background: linear-gradient(135deg, #0078d4, #005a9e);
}

.google {
    background: linear-gradient(135deg, #4285f4, #3367d6);
}

.quark {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.lanzou {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.pan123 {
    background: linear-gradient(135deg, #10b981, #059669);
}

.storage-info {
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
}

.storage-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.storage-link {
    color: var(--gray);
    font-size: 0.8rem;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.copy-btn {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    white-space: nowrap;
    font-size: 0.85rem;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.copy-btn.copied {
    background: var(--success);
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    flex-shrink: 0;
}


@media (max-width: 768px) {
    .modal {
        padding: 10px;
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
        animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @keyframes modalSlideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .modal-header {
        padding: 1rem 1rem 0.8rem;
    }

    .modal-header h3 {
        font-size: 1.2rem;
        padding-right: 30px;
    }

    .modal-header p {
        font-size: 0.85rem;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }

    .modal-body {
        padding: 1rem;
        max-height: 60vh;
    }

    .modal-description {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }

    .storage-options h4 {
        font-size: 1rem;
    }

    .storage-item {
        flex-wrap: wrap;
        padding: 0.8rem;
    }

    .storage-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1rem;
    }

    .storage-name {
        font-size: 0.9rem;
    }

    .storage-link {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }

    .copy-btn {
        width: 100%;
        margin-top: 0.5rem;
        padding: 0.6rem;
    }

    .modal-footer {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-height: 90vh;
    }

    .modal-body {
        max-height: 70vh;
    }

    .storage-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .storage-info {
        width: 100%;
    }

    .copy-btn {
        align-self: stretch;
    }
}


footer {
    background: rgba(30, 41, 59, 0.9);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}


body.white-theme {
    background: #ffffff;
}

body.white-theme header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.white-theme .logo-text h1 {
    color: #1e293b;
}

body.white-theme .logo-text p {
    color: #64748b;
}

body.white-theme .sort-controls {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.white-theme .sort-btn {
    color: #64748b;
}

body.white-theme .sort-btn.active {
    background: #6366f1;
    color: white;
}

body.white-theme .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #64748b;
}

body.white-theme .filter-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #64748b;
}

body.white-theme .page-title h2 {
    color: #1e293b;
}

body.white-theme .page-title p {
    color: #64748b;
}

body.white-theme .tool-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.white-theme footer {
    background: #f8fafc;
    color: #64748b;
}

body.white-theme .footer-section h4 {
    color: #1e293b;
}

body.white-theme .footer-links a {
    color: #64748b;
}

body.white-theme .footer-links a:hover {
    color: #6366f1;
}

body.white-theme .footer-bottom {
    color: #94a3b8;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}


body.light-theme header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .logo-text h1 {
    color: #1e293b;
}

body.light-theme .logo-text p {
    color: #64748b;
}

body.light-theme .sort-controls {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .sort-btn {
    color: #64748b;
}

body.light-theme .sort-btn.active {
    background: #6366f1;
    color: white;
}

body.light-theme .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #64748b;
}

body.light-theme .filter-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #64748b;
}

body.light-theme .page-title h2 {
    color: #1e293b;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.light-theme .page-title p {
    color: #64748b;
}

body.light-theme .tool-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}


body:not(.white-theme):not(.light-theme) .logo-text h1,
body:not(.white-theme):not(.light-theme) .logo-text p,
body:not(.white-theme):not(.light-theme) .page-title h2,
body:not(.white-theme):not(.light-theme) .page-title p {
    color: rgba(255, 255, 255, 0.9);
}

body:not(.white-theme):not(.light-theme) .sort-btn,
body:not(.white-theme):not(.light-theme) .theme-toggle,
body:not(.white-theme):not(.light-theme) .filter-btn {
    color: rgba(0, 0, 0, 0.85);
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1.2rem;
        align-items: stretch;
    }

    .nav-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .sort-controls {
        order: 2;
    }

    .theme-selector {
        order: 1;
    }

    .filter-btn {
        order: 3;
    }

    .tools-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .page-title h2 {
        font-size: 2.2rem;
        line-height: 1.2;
        padding: 0 1rem;
    }

    .page-title p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .tool-card {
        margin: 0 0.5rem;
    }

    .tool-card-header {
        height: 160px;
    }

    .tool-card-body {
        padding: 1.2rem;
    }

    .tool-card-title {
        font-size: 1.2rem;
    }

    .tool-card-description {
        font-size: 0.9rem;
    }

    .tool-card-actions {
        flex-direction: column;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .filter-sidebar {
        width: 100%;
        left: -100%;
        padding: 1.5rem;
    }

    .theme-dropdown {
        right: auto;
        left: 0;
        width: 180px;
    }

    .storage-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .copy-btn {
        align-self: stretch;
        padding: 0.8rem;
    }

    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10% auto;
    }

    .modal-header {
        padding: 1.2rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    footer {
        padding: 2rem 0 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-section {
        min-width: auto;
    }

    .footer-links {
        gap: 0.6rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tools-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
    }

    .tool-card-header {
        height: 160px;
    }

    .nav-container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-controls {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-title h2 {
        font-size: 2.4rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .modal-content {
        width: 90%;
        max-width: 550px;
    }
}

@media (min-width: 1025px) {
    .tools-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.floating-buttons {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 5px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px 0 0 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.floating-button {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: white;
    font-size: 1.5rem;
}

.floating-button.wechat {
    background: #fff;
}

.floating-button.qq {
    background: #fff;
}

.floating-button.wechat-public {
    background: #fff;
}

.floating-button:hover {
    transform: translateX(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.qr-code-popup {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    opacity: 0;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 150px;
    text-align: center;
    transition: all 0.3s ease;
    pointer-events: none;
    box-sizing: border-box;
}

.floating-button:hover .qr-code-popup {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    pointer-events: all;
}

.qr-code-popup::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--card-bg);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.qr-code-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: block;
}

.qr-code-text {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}

body.white-theme .floating-buttons,
body.light-theme .floating-buttons {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.white-theme .qr-code-popup,
body.light-theme .qr-code-popup {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.white-theme .qr-code-popup::after,
body.light-theme .qr-code-popup::after {
    border-left-color: #ffffff;
}

@media (max-width: 768px) {
    .floating-buttons {
        bottom: 65px;
        top: auto;
        transform: none;
        flex-direction: column;
        border-radius: 12px;
        padding: 5px 10px;
    }

    .floating-button {
        width: 44px;
        height: 44px;
        margin-bottom: 8px;
    }

    .qr-code-popup {
        right: 5px;
        left: auto;
        top: auto;
        transform: translateX(-50%) scale(0.9);
    }

    .floating-button:hover .qr-code-popup {
        transform: translateX(-50%) scale(1);
    }

    .qr-code-popup::after {
        right: -8px;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
        border-left: 8px solid var(--card-bg);
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
        border-right: none;
    }


    body.white-theme .qr-code-popup::after,
    body.light-theme .qr-code-popup::after {
        border-top-color: #ffffff;
    }
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}