/*
   MCEasyLink visual layer
   Existing copy, logo, images, and palette variables are intentionally retained.
*/

:root {
    --surface: rgba(19, 21, 26, 0.8);
    --surface-raised: rgba(24, 27, 35, 0.9);
    --surface-soft: rgba(19, 21, 26, 0.62);
    --edge: rgba(245, 246, 248, 0.13);
    --edge-soft: rgba(163, 188, 237, 0.2);
    --shadow: 0 20px 52px rgba(0, 0, 0, 0.22);
    --shadow-raised: 0 28px 66px rgba(0, 0, 0, 0.3);
    --radius-lg: 24px;
    --radius-md: 16px;
}

html {
    scroll-padding-top: 104px;
}

body {
    min-width: 320px;
    background:
        radial-gradient(circle at 13% 0%, rgba(163, 188, 237, 0.13), transparent 29rem),
        radial-gradient(circle at 88% 34%, rgba(192, 182, 216, 0.1), transparent 30rem),
        var(--dark);
    text-rendering: optimizeLegibility;
}

body.loaded {
    visibility: visible;
    opacity: 1;
}

h1, h2, h3, h4 {
    line-break: strict;
    text-wrap: balance;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Shared header */
.navbar {
    background: linear-gradient(135deg, rgba(22, 25, 33, 0.87), rgba(6, 7, 9, 0.76));
    border: 1px solid var(--edge);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.1), 0 18px 52px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.navbar::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(105deg, rgba(245, 246, 248, 0.09), transparent 28%, rgba(163, 188, 237, 0.07) 75%, transparent);
    pointer-events: none;
}

.navbar::after {
    content: "";
    position: absolute;
    right: 24%;
    bottom: 0;
    left: 24%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(163, 188, 237, 0.65), transparent);
    pointer-events: none;
}

.navbar .container {
    position: relative;
    z-index: 1;
}

/* The logo deliberately remains an unframed mark. */
.logo,
.logo-icon {
    background: transparent;
    box-shadow: none;
}

.nav-links {
    align-items: center;
}

.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -9px;
    left: 0;
    height: 1px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Shared content rhythm */
main.container {
    position: relative;
    max-width: 960px;
}

.page-title {
    position: relative;
    margin-bottom: 18px;
    line-height: 1.18;
    text-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}

.page-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 1px;
    margin: 19px auto 0;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.section-description {
    max-width: 720px;
    margin-bottom: 38px;
    line-height: 1.85;
}

.section,
.benefit-card,
.status-card,
.embed-fallback {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, var(--surface-raised), var(--surface));
    border-color: var(--edge);
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.075), var(--shadow);
}

.section::before,
.benefit-card::before,
.status-card::before,
.embed-fallback::before {
    content: "";
    position: absolute;
    top: 0;
    right: 20px;
    left: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 246, 248, 0.22), transparent);
}

.section {
    border-radius: var(--radius-lg);
}

.section-title,
.article-title {
    border-bottom-color: rgba(245, 246, 248, 0.11);
}

.article {
    position: relative;
}

.article:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -24px;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 246, 248, 0.09), transparent);
}

.article-list li::before {
    box-shadow: 0 0 0 4px rgba(163, 188, 237, 0.07);
}

.note {
    border-top-color: rgba(245, 176, 65, 0.16);
    border-right-color: rgba(245, 176, 65, 0.16);
    border-bottom-color: rgba(245, 176, 65, 0.16);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: inset 0 1px 0 rgba(245, 176, 65, 0.06);
}

.requirements,
.steps {
    border-radius: var(--radius-md);
}

.video-container,
.video-wrapper {
    border-color: var(--edge);
    border-radius: 20px;
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.28);
}

/* Buttons retain their existing brand colors and gain a consistent tactile treatment. */
.btn,
.btn-primary,
.btn-premium,
.btn-details,
.cta-button,
.copy-btn {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.22), 0 12px 24px rgba(0, 0, 0, 0.16);
}

.btn::before,
.btn-primary::before,
.btn-premium::before,
.btn-details::before,
.cta-button::before,
.copy-btn::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(112deg, rgba(245, 246, 248, 0.16), transparent 40%, rgba(245, 246, 248, 0.06));
    pointer-events: none;
}

.btn-secondary,
.btn-details,
.copy-btn {
    border-color: var(--edge);
    background: rgba(19, 21, 26, 0.7);
}

.btn:hover,
.btn-primary:hover,
.btn-premium:hover,
.btn-details:hover,
.cta-button:hover,
.copy-btn:hover {
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.28), 0 18px 32px rgba(0, 0, 0, 0.22);
}

/* Top page */
.announcement-bar,
.modern-bg,
.floating-cubes,
.hexagon-grid,
.neural-network {
    display: none !important;
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(ellipse 58% 76% at 82% 38%, rgba(163, 188, 237, 0.11), transparent 65%),
        linear-gradient(180deg, #151822 0%, var(--dark) 68%);
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    z-index: -1;
    width: min(54vw, 820px);
    height: 100%;
    background-image:
        linear-gradient(rgba(163, 188, 237, 0.075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(163, 188, 237, 0.075) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(90deg, transparent, #000 32%, #000 86%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 32%, #000 86%, transparent);
    opacity: 0.58;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content::before {
    content: "";
    position: absolute;
    top: -32px;
    left: -26px;
    width: 82px;
    height: 82px;
    border-top: 1px solid rgba(163, 188, 237, 0.46);
    border-left: 1px solid rgba(163, 188, 237, 0.46);
    border-radius: 24px 0 0;
    pointer-events: none;
}

.hero h1 {
    max-width: 13ch;
    line-height: 1.12;
    text-shadow: 0 12px 42px rgba(0, 0, 0, 0.25);
}

.hero-image-area {
    perspective: 1200px;
    isolation: isolate;
}

.hero-image-area::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 5% 3% 4% 5%;
    border: 1px solid var(--edge);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(245, 246, 248, 0.07), rgba(163, 188, 237, 0.035));
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.13), 0 24px 60px rgba(0, 0, 0, 0.24);
    transform: rotateY(-5deg) rotateX(2deg) translateZ(-16px);
}

.hero-image {
    position: relative;
    filter: none;
    transform: rotateY(-3deg) rotateX(1deg) translateZ(14px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-area:hover .hero-image {
    transform: rotateY(-1deg) rotateX(0) translateZ(26px) translateY(-4px);
}

.features,
.servers,
.video-section,
.faq-section,
.cta-section,
.credit-section {
    position: relative;
}

.servers,
.video-section,
.credit-section,
.footer {
    background: rgba(6, 7, 9, 0.42);
}

.features::before,
.servers::before,
.video-section::before,
.faq-section::before,
.cta-section::before,
.credit-section::before {
    content: "";
    position: absolute;
    top: 0;
    right: 5%;
    left: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--edge), transparent);
}

.section-header h2 {
    max-width: 15ch;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.feature-card,
.server-card,
.accordion-item,
.credit-content {
    position: relative;
    overflow: hidden;
    background: rgba(19, 21, 26, 0.78);
    border-color: var(--edge);
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.075), 0 16px 38px rgba(0, 0, 0, 0.16);
}

.feature-card::before,
.server-card::before,
.accordion-item::before,
.credit-content::before {
    content: "";
    position: absolute;
    top: 0;
    right: 20px;
    left: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 246, 248, 0.24), transparent);
}

.feature-card,
.server-card {
    border-radius: 22px;
}

.feature-card:nth-child(1),
.feature-card:nth-child(6) {
    background: linear-gradient(135deg, rgba(25, 29, 39, 0.9), rgba(19, 21, 26, 0.78));
}

.feature-card:hover,
.server-card:hover {
    background: rgba(25, 29, 37, 0.92);
    border-color: rgba(163, 188, 237, 0.42);
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.12), 0 22px 48px rgba(0, 0, 0, 0.22);
    transform: translateY(-6px);
}

.icon-box {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(163, 188, 237, 0.18);
    border-radius: 14px;
    background: rgba(163, 188, 237, 0.08);
    box-shadow: none;
}

.video-wrapper {
    transform: perspective(1200px) rotateX(1deg);
}

.accordion-item {
    border-radius: 18px;
}

.accordion-item:hover {
    border-color: rgba(163, 188, 237, 0.38);
}

.cta-container {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-color: var(--edge);
    border-radius: 28px;
    background:
        radial-gradient(circle at 83% 22%, rgba(163, 188, 237, 0.15), transparent 22rem),
        linear-gradient(135deg, rgba(27, 31, 41, 0.88), rgba(11, 12, 16, 0.86));
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.14), var(--shadow-raised);
}

.cta-container::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -45%;
    right: -9%;
    width: 360px;
    aspect-ratio: 1;
    border: 1px solid rgba(245, 246, 248, 0.16);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(192, 182, 216, 0.2), rgba(163, 188, 237, 0.015));
    box-shadow: inset 18px 18px 40px rgba(245, 246, 248, 0.09), inset -22px -22px 36px rgba(0, 0, 0, 0.2);
}

.credit-content {
    border-radius: 18px;
}

/* Donation and status views */
.benefits-grid {
    align-items: stretch;
}

.benefit-card,
.status-card {
    border-radius: var(--radius-lg);
}

.benefit-card:hover,
.status-card:hover {
    border-color: rgba(163, 188, 237, 0.42);
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.12), var(--shadow-raised);
    transform: translateY(-6px);
}

.benefit-premium {
    border-color: rgba(245, 176, 65, 0.28);
}

.benefit-header {
    border-bottom-color: rgba(245, 246, 248, 0.1);
}

.benefit-price {
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.status-embed iframe {
    border-radius: var(--radius-lg);
}

/* Footer and utility controls */
.footer {
    border-top-color: var(--edge);
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.03);
}

.footer-logo,
.footer-logo-text {
    filter: none;
}

.footer-link {
    padding-bottom: 2px;
}

.footer-link:hover {
    color: var(--primary);
}

.social-icon {
    transition: color 0.25s ease, transform 0.25s ease;
}

.scroll-btn {
    right: 24px;
    bottom: 24px;
    border-color: var(--edge);
    border-radius: 14px;
    background: rgba(19, 21, 26, 0.82);
    box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.11), 0 12px 28px rgba(0, 0, 0, 0.22);
}

@media (min-width: 901px) {
    .navbar {
        top: 16px;
        left: 50%;
        width: min(calc(100% - 48px), 1200px);
        padding: 13px 0;
        transform: translateX(-50%);
    }

    .navbar .container {
        padding-right: 26px;
        padding-left: 26px;
    }

    .nav-links {
        gap: clamp(16px, 2vw, 26px);
    }

    .hero {
        padding-top: 126px;
    }
}

@media (max-width: 900px) {
    html {
        scroll-padding-top: 82px;
    }

    .navbar {
        top: 10px;
        left: 10px;
        width: calc(100% - 20px);
        padding: 8px 0;
        border-radius: 16px;
    }

    .navbar .container {
        min-height: 38px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .navbar::after {
        right: 26%;
        left: 26%;
    }

    .logo {
        gap: 8px;
        font-size: 1rem;
    }

    .logo-icon {
        font-size: 1.1rem;
    }

    .menu-toggle {
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
        border: 1px solid rgba(245, 246, 248, 0.12);
        border-radius: 11px;
        background: rgba(245, 246, 248, 0.06);
        box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.11);
        color: var(--light);
        font-size: 1rem;
    }

    .mobile-menu.active {
        z-index: 1002;
    }

    .mobile-menu {
        justify-content: flex-start;
        padding: 84px 24px 32px;
        background:
            radial-gradient(circle at 92% 4%, rgba(163, 188, 237, 0.13), transparent 16rem),
            linear-gradient(180deg, rgba(11, 12, 16, 0.98), rgba(6, 7, 9, 0.98));
    }

    .mobile-menu-content {
        width: min(100%, 420px);
        gap: 0;
        padding: 8px 0;
        border-top: 1px solid rgba(245, 246, 248, 0.14);
        border-bottom: 1px solid rgba(245, 246, 248, 0.1);
    }

    .mobile-menu a {
        position: relative;
        display: flex;
        min-height: 58px;
        width: 100%;
        align-items: center;
        padding: 0 6px 0 16px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: var(--light-gray);
        font-size: 1rem;
        font-weight: 400;
        letter-spacing: 0.01em;
        opacity: 1;
        transform: none;
        transition: color 0.25s ease, background-color 0.25s ease, padding-left 0.25s ease;
    }

    .mobile-menu a::before {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        left: 16px;
        height: 1px;
        background: linear-gradient(90deg, rgba(245, 246, 248, 0.12), transparent);
    }

    .mobile-menu a::after {
        content: "↗";
        margin-left: auto;
        color: var(--primary);
        font-size: 0.95rem;
        opacity: 0;
        transform: translate(-5px, 2px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    body[data-page="home"] .mobile-menu a[href="index.html"],
    body[data-page="friends"] .mobile-menu a[href="friends.html"],
    body[data-page="gamertag"] .mobile-menu a[href="gemertag.html"],
    body[data-page="donation"] .mobile-menu a[href="kifu.html"] {
        margin: 0 0 8px;
        border-radius: 12px;
        background: linear-gradient(110deg, rgba(163, 188, 237, 0.16), rgba(192, 182, 216, 0.055));
        color: var(--light);
        box-shadow: inset 0 1px 0 rgba(245, 246, 248, 0.12);
    }

    body[data-page="home"] .mobile-menu a[href="index.html"]::before,
    body[data-page="friends"] .mobile-menu a[href="friends.html"]::before,
    body[data-page="gamertag"] .mobile-menu a[href="gemertag.html"]::before,
    body[data-page="donation"] .mobile-menu a[href="kifu.html"]::before,
    .mobile-menu a:last-child::before {
        display: none;
    }

    .mobile-menu a:nth-child(5) {
        margin-top: 16px;
    }

    .mobile-menu a:hover,
    .mobile-menu a:active {
        padding-left: 20px;
        background: transparent;
        color: var(--light);
    }

    .mobile-menu a:hover::after,
    .mobile-menu a:active::after,
    body[data-page="home"] .mobile-menu a[href="index.html"]::after,
    body[data-page="friends"] .mobile-menu a[href="friends.html"]::after,
    body[data-page="gamertag"] .mobile-menu a[href="gemertag.html"]::after,
    body[data-page="donation"] .mobile-menu a[href="kifu.html"]::after {
        opacity: 1;
        transform: translate(0, 2px);
    }

    .close-menu {
        top: 18px;
        right: 18px;
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        border: 1px solid var(--edge);
        border-radius: 14px;
        background: rgba(245, 246, 248, 0.07);
        color: var(--light);
        font-size: 1rem;
    }

    main.container {
        padding-top: 106px !important;
        padding-bottom: 60px;
    }

    .section {
        padding: 30px 22px;
        border-radius: 20px;
    }

    .page-title {
        font-size: clamp(2rem, 9vw, 2.45rem);
    }

    .hero {
        padding-top: 92px;
        padding-bottom: 54px;
    }

    .hero::before {
        width: 100%;
        background-size: 42px 42px;
        mask-image: linear-gradient(180deg, #000, transparent 70%);
        -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
    }

    .hero-content::before {
        top: -22px;
        left: -8px;
        width: 58px;
        height: 58px;
        border-radius: 18px 0 0;
    }

    .hero h1 {
        max-width: 12ch;
        margin-right: auto;
        margin-left: auto;
        font-size: clamp(2.25rem, 10vw, 2.8rem);
    }

    .hero-image-area::before {
        border-radius: 22px;
        transform: rotateX(1deg) translateZ(-12px);
    }

    .hero-image {
        transform: rotateX(0.5deg) translateZ(10px);
    }

    .hero-image-area:hover .hero-image {
        transform: translateZ(18px) translateY(-3px);
    }

    .cta-buttons {
        gap: 10px;
    }

    .cta-buttons .btn,
    .copy-btn,
    .cta-button {
        display: inline-flex;
        min-height: 50px;
        align-items: center;
        justify-content: center;
    }

    .section-header h2 {
        max-width: 13ch;
        font-size: clamp(1.9rem, 8vw, 2.35rem);
        line-height: 1.14;
    }

    .feature-card,
    .server-card {
        border-radius: 20px;
    }

    .accordion-header {
        min-height: 64px;
        gap: 16px;
        padding: 18px 20px;
        line-height: 1.45;
    }

    .cta-container {
        padding: 40px 24px;
    }

    .cta-container::before {
        top: -28%;
        right: -37%;
        width: 280px;
    }

    .scroll-btn {
        right: 16px;
        bottom: 16px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-right: 18px;
        padding-left: 18px;
    }

    .section {
        padding: 26px 18px;
    }

    .article-content {
        padding-left: 0;
    }

    .footer-links {
        width: 100%;
        gap: 4px;
    }

    .footer-link {
        display: flex;
        min-height: 42px;
        align-items: center;
        padding: 0 2px;
    }

    .social-icon {
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        border: 1px solid var(--edge);
        border-radius: 12px;
        background: rgba(19, 21, 26, 0.64);
    }

    .feature-card:nth-child(1),
    .feature-card:nth-child(6) {
        background: rgba(19, 21, 26, 0.78);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
