:root {
    --bg-gradient: linear-gradient(
            135deg,
            #131f37 0%,
            #1c2942 100%
    );
    --text: #ffffff;
    --accent: #64ffda;
    --card-bg: rgba(13, 25, 48, 0.98);
    font-size: 19px;
}

body {
    background: var(--bg-gradient);
    color: var(--text);
    font-family: "Inter", sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body p {
    line-height: 1.9rem;
}

a:visited {
    color: #a0ffe5;
}

.nav-container {
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.nav-content {
    position: relative;
    text-align: center;
}

.nav-content a {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    margin: 0 1rem;
    transition: color 0.2s ease;
}

.nav-content a:hover {
    color: var(--accent);
}

.nav-content svg {
    margin-right: 0.5rem;
}

.hero-section {
    position: relative;
    padding: 2rem 3rem;
    background: var(--card-bg);
    border: 1px solid rgba(100, 255, 218, 0.1);
    border-radius: 0.5rem;
    min-width: 420px;
    max-width: 1400px;
    margin: 1rem auto;
}

.hero-section p {
    color: #dddddd;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

.hero-content {
    text-align: left;
}

.hero-image .img-container {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(100, 255, 218, 0.15);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow:
            0 0 15px rgba(100, 255, 218, 0.15),
            0 0 30px rgba(100, 255, 218, 0.07),
            0 0 60px rgba(100, 255, 218, 0.04);
}

.hero-image .img-container img {
    width: 100%;
    height: auto;
    border-radius: 0.25rem;
    box-shadow: none;
}

.bg-near-white {
    background-color: rgba(255, 255, 255, 0.12);
}

.signout-button {
    background: black;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 0;
    padding: 0.5rem;
    width: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
}

.signout-button:hover {
    background: var(--accent);
    color: var(--card-bg);
}

.user-info {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: black;
    border-radius: 0;
    border: 1px solid rgba(100, 255, 218, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-info .user-name {
    color: var(--text);
    font-weight: 600;
    padding: 0.25rem 0;
}

.user-info.expanded {
    padding: 1rem 0.9rem
}

.user-info.collapsed {
    padding: 1rem;
    width: auto;
    overflow: hidden;
}

.user-info.collapsed .signout-button {
    display: none;
}

.user-info {
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 9999 !important;
}

.app-card {
    max-width: 1200px;
    margin: 1rem auto;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.pixel {
    width: 8px;
    height: 8px;
    display: inline-block;
    transition: transform 0.15s ease;
}

.pixel:hover {
    transform: scale(1.5);
    z-index: 1;
}

.token-table {
    border-radius: 0.25rem;
    overflow: hidden;
}

.code-card {
    background: #2d2d2d;
    border: 2px solid #366;
    border-radius: 3px;
    position: relative;
    padding-top: 10px;
    transition: opacity 0.3s ease;
    color: #eee;
    max-width: 850px;
}

.code-card pre {
    margin: 0 !important;
}

.code-card pre,
.code-card code {
    color: inherit;
    background: none;
}

.code-label-left {
    position: absolute;
    top: 0;
    left: 0;
    background: #366;
    color: #ffc;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-bottom-right-radius: 0.5rem;
}

.copy-button {
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #444 !important;
    color: #ccc !important;
    border-radius: 0.25rem;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s ease;
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

.copy-button:active {
    outline: 3px solid darkcyan;
}

.copy-button:hover {
    opacity: 0.8;
    background: #555 !important;
    color: #fff !important;
}

.copy-flash {
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.42s ease-in-out;
}

.copy-outline {
    outline: 1px solid rgba(255, 255, 255, 0.3);
    outline-offset: 1px;
    transition: outline 0.42s ease-in-out;
}

.snippet-arrow {
    width: 28px;
    height: 28px;
    fill: var(--accent);
    transition: transform 0.3s ease, fill 0.3s ease;
    cursor: pointer;
    margin-left: 0.5rem;
}

.snippet-arrow.rotated {
    transform: rotate(180deg);
}

.snippet-arrow.gray {
    fill: gray;
}

.hidden-snippet {
    opacity: 0;
    pointer-events: none;
    height: 0;
    margin-top: 0 !important;
    padding: 0 !important;
}

.code-desc {
    color: #ccc;
    font-size: 1.3rem;
    line-height: 1.4;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.accent {
    color: var(--accent);
}

.o-80 {
    opacity: 0.8;
}
.o-70 {
    opacity: 0.7;
}

@keyframes blink-cursor {
    0%, 24% {
        opacity: 1;
        background-image: url('assets/blinking-cursor.svg');
    }
    25%, 49% {
        opacity: 0;
        background-image: none;
    }
    50%, 74% {
        opacity: 1;
        background-image: url('assets/blinking-cursor.svg');
    }
    75%, 99% {
        opacity: 0;
        background-image: none;
    }
    100% {
        opacity: 1;
        background-image: url('assets/wikimedia_javascript_logo.svg');
    }
}

.near-cursor::after {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 2rem;
    background-size: contain;
    background-position: bottom left;
    background-repeat: no-repeat;
    margin-left: 12px;
    vertical-align: baseline;
    transform: translateY(1rem);
    animation: blink-cursor 2s steps(1) 1;
    animation-fill-mode: forwards;
}

.transform-l {
    transform-origin: top left;
}

.rotate-stamp {
    transform: translate(-30%, 30%) rotate(-45deg);
}

.relative {
    z-index: 0;
}

.nav-container,
.hero-section,
.mw8.center.relative {
    z-index: auto !important;
    position: relative;
}

.transform-wrapper {
    perspective: 1666px;
    z-index: 1;
    max-width: 80%;
}
.transform-content {
    transform:
            translateX(5%)
            translateY(3%)
            rotateY(15deg)
            rotateX(-5deg);
    transform-origin: left center;
    transition: transform 0.4s ease-out;
    position: relative;
}
.transform-content:hover {
    transform:
            translateX(2%)
            translateY(1%)
            rotateY(10deg)
            rotateX(-3deg)
            scale(1.1);
}

#demo {
    background: url('assets/near-blog-berry-club.png') #000 no-repeat top center/cover;
    backdrop-filter: blur(3px);
}

.blockquote-card-subtle {
    position: relative;
    background: var(--card-bg);
    border-radius: 0.5rem;
    border-left: 6px solid var(--accent);
    border-right: 6px solid var(--accent);
    padding: 1.5rem;
    isolation: isolate;

}

#demo::before {
    content: "";
    position: absolute;
    inset: 19px;
    background: linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.6) 3%,
            rgba(255, 255, 255, 0.2) 33%,
            rgba(255, 255, 255, 0.1) 60%
    );
    border-radius: 16px;
    backdrop-filter: blur(6px) brightness(130%) saturate(190%);
    z-index: -1;
}

#public-key {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.demo-inner a {
    color: deeppink;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.demo-inner a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.demo-inner a:hover::before {
    transform: scaleX(1);
}

.demo-inner a:visited {
    color: darkviolet;
}

.demo-inner a[href*="github.com"] {
    padding-right: 1.3rem;
    margin-right: 0.4rem;
}

.demo-inner a[href*="github.com"]::after {
    content: '';
    position: absolute;
    right: -4px;
    width: 23px;
    height: 23px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
}

.blockquote-card-subtle p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-transition {
    transition: background-color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.fun-tech {
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(0, 0, 0, 0.9);
    font-weight: 300;
}

/* Overriding w-auto to ensure the CTA doesn't stretch wide */
.w-auto {
    width: auto !important;
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(6px) brightness(1.1) saturate(50%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

code {
    background-color: #f5f5f5;
    padding: 4px 6px;
    margin: 0 2px;
    border-radius: 4px;
    color: rgba(0, 0, 0, 0.8);
    font-family: monospace;
}

.neon-text {
    text-shadow: 0 0 1px #00ffa2, 0 0 0 #00ffa2, 0 0 1px #00a2ff;
    animation: subtleNeon 3s ease-in-out 1 alternate-reverse;
    letter-spacing: 0.2rem;
}

#auth.expanded .account-name {
    padding-bottom: 1.3rem;
    position: relative;
}

#auth.expanded .account-name::after {
    content: "⬇";
    font-size: 0.666rem;
    color: #eee;
    position: absolute;
    left: 50%;
    top: 66%;
}

#auth.expanded .account-name:hover::after {
    opacity: 0.9;
}

#auth .near-contract:hover, #auth .near-public-key:hover {
    scale: 1.05;
    transition: scale 0.3s ease-in-out;
}

@keyframes subtleNeon {
    0% {
        text-shadow: 0 0 1px #00ffa2, 0 0 0 #00ffa2, 0 0 1px #00a2ff;
        letter-spacing: 0.2rem;
    }
    50% {
        text-shadow: 0 0 0 #00ffa2, 0 0 1px #00ffa2, 0 0 0 #00a2ff;
        letter-spacing: 0.21rem;
    }
    100% {
        text-shadow: 0 0 1px #00ffa2, 0 0 0 #00ffa2, 0 0 1px #00a2ff;
        letter-spacing: 0.2rem;
    }
}

.grow {
    transform: scale(1.06);
}

.square-initial {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contract-info {
    display: flex;
    align-items: center;
}

#compilations li {
    min-width: 370px;
}

/* media queries to try to stay above */

@media (max-width: 960px) {
    #demo::before {
        inset: 10px;
    }
    .neon-text {
        font-size: 0.98rem;
        padding: 2px;
    }
}

@media (max-width: 768px) {
    .neon-text {
        font-size: 0.9rem;
        padding: 1px;
    }
    .mw8 {
        max-width: 96% !important;
    }
    .ph5-ns {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .app-card {
        padding: 1rem !important;
    }
    .demo-inner {
        padding: 0;
    }
    #demo::before {
        inset: 0;
    }
    .hero-section {
        padding: 0.666rem;
    }
    .code-label-left {
        max-width: 60%;
    }
}
