:root {
    --border-radius-soft: 12px;
    --border-radius-round: 18px;
    --border-radius-pill: 50px;
    --transition-std: all 0.35s ease-in-out;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: rgba(224, 224, 224, 0.7);
    --muted-text-color: rgba(224, 224, 224, 0.5);
    --border-color-subtle: rgba(255, 255, 255, 0.1);
    --background-color-page: #000000;
    --glass-base-bg: rgba(0, 0, 0, 0.5);
    --button-primary-bg: #f0f0f0;
    --button-primary-text: #0a0a0a;
    --button-primary-hover-bg: #ffffff;
    --success-color: #90ee90;
    --error-color: #ff8f92;
    --info-color: #87ceeb;
    --accent-color: #bdbdbd;
    --image-fade: rgba(0, 0, 0, 1);
    --gradient-start: rgba(0, 0, 0, 0);
    --gradient-middle: rgba(0, 0, 0, 0.5);
    --gradient-end: rgba(0, 0, 0, 1);
    --gradient-middle-pos: 40%;
    --gradient-end-pos: 70%;
}

body.light-theme {
    --primary-text-color: #1d1d1f;
    --secondary-text-color: rgba(29, 29, 31, 0.7);
    --muted-text-color: rgba(29, 29, 31, 0.5);
    --border-color-subtle: rgba(0, 0, 0, 0.1);
    --background-color-page: #f5f5f7;
    --glass-base-bg: rgba(255, 255, 255, 0.6);
    --button-primary-bg: #000000;
    --button-primary-text: #ffffff;
    --button-primary-hover-bg: #000000;
    --accent-color: #000000;
    --image-fade: rgba(255, 255, 255, 1);
    --gradient-start: rgba(255, 255, 255, 0);
    --gradient-middle: rgba(255, 255, 255, 0.5);
    --gradient-end: rgba(255, 255, 255, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body {
    position: relative;
    background-color: var(--background-color-page);
    background-image: linear-gradient(to right, var(--border-color-subtle) 1px, transparent 1px), linear-gradient(to bottom, var(--border-color-subtle) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 4rem 1rem;
    overflow-x: hidden;
    transition: background-color 0.4s ease;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, var(--gradient-start) 0%, var(--gradient-middle) var(--gradient-middle-pos), var(--gradient-end) var(--gradient-end-pos));
    z-index: 1;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--cursor-x) var(--cursor-y), hsla(0, 0%, 100%, 0.363) 50px, hsla(0, 0%, 100%, 0.125) 150px, transparent 300px);
    mask-image: linear-gradient(to right, white 1px, transparent 1px), linear-gradient(to bottom, white 1px, transparent 1px);
    -webkit-mask-image: linear-gradient(to right, white 1px, transparent 1px), linear-gradient(to bottom, white 1px, transparent 1px);
    mask-size: 60px 60px;
    -webkit-mask-size: 60px 60px;
    mask-position: center;
    -webkit-mask-position: center;
    opacity: var(--cursor-opacity, 0);
    transition: opacity 0.3s ease-out;
    z-index: 0;
}

body.light-theme::after {
    background: radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(0, 0, 0, 0.15) 50px, rgba(0, 0, 0, 0.2) 150px, transparent 300px);
}

.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--glass-base-bg);
    border: 1px solid var(--border-color-subtle);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
    transition: var(--transition-std);
    backdrop-filter: blur(10px);
}

.theme-switcher:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-switcher .sun-icon,
.theme-switcher .moon-icon {
    font-size: 20px;
    position: absolute;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.theme-switcher .sun-icon {
    color: #f39c12;
    transform: translateY(-150%);
    opacity: 0;
}

.theme-switcher .moon-icon {
    color: #f1c40f;
    transform: translateY(0);
    opacity: 1;
}

body.light-theme .theme-switcher .sun-icon {
    transform: translateY(0);
    opacity: 1;
}

body.light-theme .theme-switcher .moon-icon {
    transform: translateY(150%);
    opacity: 0;
}

.blurry-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.blurry-orbs>div {
    position: absolute;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(80px);
    animation: moveOrb 15s infinite alternate;
}

.blurry-orbs>div:nth-child(1) {
    height: 250px;
    width: 250px;
    top: 10%;
    left: 5%;
    animation-duration: 25s;
}

.blurry-orbs>div:nth-child(2) {
    height: 200px;
    width: 200px;
    top: 60%;
    right: 10%;
    animation-duration: 18s;
    animation-delay: -5s;
}

.blurry-orbs>div:nth-child(3) {
    height: 150px;
    width: 150px;
    bottom: 5%;
    left: 20%;
    animation-duration: 20s;
}

@keyframes moveOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(120px, -80px) scale(1.4);
    }

    100% {
        transform: translate(-40px, 100px) scale(0.8);
    }
}

main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.main-content-wrapper {
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    text-align: center;
}

@keyframes gentle-swell {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-in {
    animation: gentle-swell 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.hero-header {
    animation-delay: 0.1s;
}

.code-block-container {
    animation-delay: 0.2s;
}

.installation-guides {
    animation-delay: 0.3s;
}

.hero-header h1 {
    font-size: clamp(2.8rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--primary-text-color);
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    margin-top: 20rem;
}

.hero-header .subtitle {
    font-size: clamp(1rem, 4vw, 1.2rem);
    color: var(--secondary-text-color);
    max-width: 500px;
    margin: 0 auto;
}

.interactive-border {
    position: relative;
    background-color: var(--glass-base-bg);
    border: 1px solid var(--border-color-subtle);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.3s ease;
}

.interactive-border:hover {
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
    border-color: var(--border-color-strong);
}

.interactive-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid transparent;
    background: radial-gradient(400px circle at var(--x) var(--y), var(--accent-color), transparent 40%) border-box;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: var(--opacity, 0);
    transition: opacity 0.3s ease-out;
}

.code-wrapper {
    display: flex;
    align-items: center;
    border-radius: var(--border-radius-pill);
    padding: 0.6rem;
    gap: 0.5rem;
    background-color: var(--glass-base-bg);
}

#bookmarklet-code {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--secondary-text-color);
    font-family: 'Menlo', 'Consolas', monospace;
    font-size: 0.9rem;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    text-align: left;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#bookmarklet-code::-webkit-scrollbar {
    display: none;
}

#copy-button,
#copy-userscript-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
    border: none;
    border-radius: var(--border-radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-std);
    flex-shrink: 0;
    padding: 0 1.5rem;
}

#copy-button:hover:not(:disabled),
#copy-userscript-button:hover:not(:disabled) {
    transform: scale(1.05);
}

#copy-button i,
#copy-userscript-button i {
    margin-right: 0.6rem;
}

.installation-guides {
    padding: 2rem;
    border-radius: var(--border-radius-round);
    text-align: left;
    margin-bottom: 50px;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-text-color);
    margin-bottom: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color-subtle);
    text-align: center;
}

.section-subtitle {
    color: var(--secondary-text-color);
    line-height: 1.6;
    text-align: center;
    margin-bottom: 1.5rem;
}

.extension-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.extension-links a {
    color: var(--primary-text-color);
    text-decoration: none;
    background: var(--border-color-subtle);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-pill);
    transition: var(--transition-std);
}

.extension-links a:hover {
    background: var(--border-color-strong);
    transform: translateY(-2px);
}

.userscript-container {
    border-radius: var(--border-radius-soft);
    margin: 1.5rem 0;
    position: relative;
    padding: 1rem;
}

.userscript-container pre {
    background: transparent;
    overflow-x: auto;
    font-size: 0.85rem;
}

.userscript-container pre code {
    color: var(--secondary-text-color);
    font-family: 'Menlo', 'Consolas', monospace;
    background: none;
    padding: 0;
}

#copy-userscript-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    height: 36px;
    padding: 0 1rem;
    font-size: 0.85rem;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--border-color-subtle);
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 0;
    margin-right: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-text-color);
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 2px;
    background-color: var(--primary-text-color);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.tab-button:hover,
.tab-button.active {
    color: var(--primary-text-color);
}

.tab-button.active::after {
    transform: scaleX(1);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.instructions-list {
    list-style: decimal inside;
    padding-left: 0.5rem;
    line-height: 1.8;
    color: var(--secondary-text-color);
}

.instructions-list li {
    margin-bottom: 1rem;
}

.instructions-list li:last-child {
    margin-bottom: 0;
}

.instructions-list code {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--primary-text-color);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

html.light-theme .instructions-list code {
    background-color: rgba(0, 0, 0, 0.05);
}

.page-footer {
    width: 100%;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--muted-text-color);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color-subtle);
    margin-top: auto;
    z-index: 1000;
}

.page-footer nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.page-footer a {
    color: var(--secondary-text-color);
    text-decoration: none;
    transition: var(--transition-std);
}

.page-footer a:hover {
    color: var(--primary-text-color);
}

@media (max-width: 640px) {
    body {
        padding: 0.75rem;
    }

    .main-content-wrapper {
        gap: 1.5rem;
    }

    .top-right-controls {
        top: 15px;
        right: 15px;
    }

    .installation-guides {
        padding: 1.5rem;
    }

    #bookmarklet-code {
        font-size: 0.8rem;
        padding-left: 1rem;
    }

    #copy-button {
        height: 44px;
        padding: 0 1.25rem;
    }

    .tab-button {
        font-size: 0.95rem;
        margin-right: 1.25rem;
    }

    #copy-userscript-button {
        font-size: 0.8rem;
        height: 32px;
        padding: 0 0.8rem;
    }
}