:root {
    --cyan: #00b4d8;
    --purple: #7209b7;
    --bg-light: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #1d3557;
    --text-muted: #6c757d;
    --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.08);
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background: radial-gradient(circle at center, rgba(114, 9, 183, 0.05) 0%, transparent 60%);
}

#canvas {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes grid-travel {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 60px;
    }
}

.grid-perspective {
    position: fixed;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 100vh;
    background-image:
        linear-gradient(rgba(114, 9, 183, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 168, 204, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(500px) rotateX(65deg);
    transform-origin: bottom;
    pointer-events: none;
    z-index: 1;
    animation: grid-travel 4s linear infinite;
}

.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 20;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 12px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--cyan);
}

.datetime {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
    font-family: monospace;
}

.time-accent {
    color: var(--purple);
    font-weight: 700;
}

.ui-layer {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12vh 20px 60px;
    box-sizing: border-box;
}

.main-title {
    font-family: 'Poppins', sans-serif;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 45px;
    background: linear-gradient(135deg, var(--text-main), var(--purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(114, 9, 183, 0.15);
    text-align: center;
}

.content-panel {
    width: 100%;
    max-width: 1180px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 28px 32px;
    box-sizing: border-box;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-soft);
}
.content-title {
    margin: 0 0 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
}

.content-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
}

.content-text + .content-text {
    margin-top: 12px;
}

.search-wrapper {
    width: 100%;
    max-width: 750px;
    margin-bottom: 60px;
}

.search-engines {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
}

.search-engines li {
    cursor: pointer;
    padding: 6px 15px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.search-engines li.active {
    background: var(--cyan);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3);
}

.search-form {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 8px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.search-form:focus-within {
    transform: scale(1.02);
    border-color: rgba(0, 180, 216, 0.5);
    box-shadow: var(--shadow-hover);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 24px;
    color: var(--text-main);
    font-size: 17px;
    font-weight: 500;
    outline: none;
}

.search-input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.search-btn {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border: none;
    color: white;
    padding: 0 30px;
    border-radius: 18px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: opacity 0.3s, transform 0.2s;
}

.search-btn:hover {
    opacity: 0.95;
    transform: translateY(-2px);
}

.search-btn:active {
    transform: translateY(0);
}

.links-container {
    width: 100%;
    max-width: 1180px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 32px;
    box-sizing: border-box;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.4s ease;
}

.links-container:hover {
    box-shadow: var(--shadow-hover);
}

.content-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
    gap: 24px;
    margin-top: 28px;
}

.content-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
}

.content-list li + li {
    margin-top: 8px;
}

.link-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.link-group {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 24px;
    padding: 22px 22px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.group-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.group-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(29, 53, 87, 0.1), transparent);
}

.group-toggle {
    border: 1px solid rgba(114, 9, 183, 0.14);
    background: rgba(114, 9, 183, 0.08);
    color: var(--purple);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.group-toggle:hover {
    background: rgba(114, 9, 183, 0.14);
    border-color: rgba(114, 9, 183, 0.22);
    transform: translateY(-1px);
}

.group-toggle[hidden] {
    display: none;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 16px 10px;
}

.links-grid.is-collapsed .link-item:nth-child(n + 9) {
    display: none;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    padding: 10px 8px 12px;
    border-radius: 18px;
    min-height: 94px;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.52);
    transform: translateY(-4px);
}

.link-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(241, 246, 251, 0.92));
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.link-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.link-icon.is-fallback::after {
    content: attr(data-fallback);
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--purple);
}

.link-item:hover .link-icon {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.link-text {
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: center;
    line-height: 1.35;
}

@media (max-width: 768px) {
    .content-panel {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .links-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .links-container {
        padding: 28px 24px;
    }
}

@media (max-width: 640px) {
    .top-nav {
        padding: 18px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .datetime {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .ui-layer {
        padding: 16vh 16px 44px;
    }

    .main-title {
        font-size: 34px;
        text-align: center;
        margin-bottom: 32px;
    }

    .content-panel {
        padding: 20px 16px;
        border-radius: 24px;
    }

    .content-title {
        font-size: 24px;
    }

    .search-wrapper {
        margin-bottom: 36px;
    }

    .links-container {
        padding: 20px 16px;
        border-radius: 24px;
    }

    .link-group {
        padding: 18px 14px;
    }

    .group-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .links-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px 10px;
    }

    .link-item {
        min-height: 88px;
        padding: 8px 4px 10px;
    }
}

.footer {
    margin-top: auto;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.footer a {
    color: var(--cyan);
    text-decoration: none;
}