/* ===========================================
   AyuServer Portal
   style.css
=========================================== */

:root {
    --primary:      #3bb9ff;
    --primary-dark: #1d9be6;
    --secondary:    #6ee7ff;
    --accent:       #6cf5c2;

    --bg:   #08111f;
    --bg2:  #0f1c30;

    --card:       rgba(255,255,255,.07);
    --card-hover: rgba(255,255,255,.11);

    --text:  #f0f6ff;
    --text2: rgba(220,235,255,.65);

    --border: rgba(255,255,255,.08);
    --shadow: 0 20px 40px rgba(0,0,0,.4);

    --radius:     20px;
    --transition: .3s cubic-bezier(.4,0,.2,1);
}



/* ===========================================
   Reset
=========================================== */

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

html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(ellipse at top left,  #1a3a5c66, transparent 50%),
        radial-gradient(ellipse at bottom right, #0d2a4433, transparent 50%),
        var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "Yu Gothic UI", sans-serif;
    overflow-x: hidden;
}

/* ===========================================
   Scrollbar
=========================================== */

::-webkit-scrollbar        { width: 8px; }
::-webkit-scrollbar-track  { background: #050d18; }
::-webkit-scrollbar-thumb  { background: #2a7aaa; border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: #3b9fd4; }

/* ===========================================
   Background Blur
=========================================== */

.bg-blur {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.blur {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: .12;
}

.blur.one {
    background: #3bb9ff;
    top: -300px;
    left: -200px;
}

.blur.two {
    background: #3bb9ff;
    bottom: -300px;
    right: -200px;
}

/* ===========================================
   Header
=========================================== */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(8,17,31,.75);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), backdrop-filter var(--transition);
}

main {
    position: relative;
    z-index: 1;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(8,17,31,.35);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.navbar-container {
    max-width: 1300px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.3px;
}

.logo img { width: 44px; }

.nav-menu {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-link {
    color: var(--text2);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    position: relative;
    transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active { color: white; }

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width .3s;
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ===========================================
   Hamburger
=========================================== */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: rgba(255,255,255,.8);
    border-radius: 20px;
    transition: .3s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg)  translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===========================================
   Container
=========================================== */

.container {
    max-width: 1300px;
    margin: auto;
    padding: 0 25px;
    width: 100%;
}

/* ===========================================
   Hero
=========================================== */

.hero {
    position: relative;
    display: block;
    padding: 96px 20px 72px;
    text-align: center;
    overflow: hidden;
    margin-top: 0;
    isolation: isolate;
}

.hero.hero-landing {
    position: relative;
    z-index: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 150px 20px 110px;
    overflow: hidden;
    isolation: isolate;
}


.hero.hero-landing::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../images/background.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.04);
    z-index: -2;
}

.hero.hero-landing::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6,12,22,.42), rgba(8,17,31,.28));
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(780px, 100%);
    margin: 0 auto;
    padding: clamp(32px, 4vw, 56px);
    border-radius: 30px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    color: #fff;
    animation: heroTitle .8s ease;
}

.hero.hero-landing h1 {
    font-size: clamp(44px, 7vw, 78px);
    margin-bottom: 22px;
    line-height: 1.05;
    text-shadow: 0 4px 16px rgba(0,0,0,.55), 0 0 24px rgba(0,0,0,.35);
}

.hero p {
    color: rgba(242,248,255,.94);
    max-width: 700px;
    margin: auto;
    font-size: 17px;
    line-height: 1.8;
    animation: heroText 1s ease;
}

.hero.hero-landing p {
    font-size: 18px;
    line-height: 1.9;
    text-shadow: 0 2px 10px rgba(0,0,0,.45);
}

.hero.hero-sub h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    margin-top: 0;
}

.hero.hero-sub p {
    font-size: 16px;
    line-height: 1.8;
}

.hero-summary {
    max-width: 680px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 42px;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(235,245,255,.8);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: .2em;
    text-transform: uppercase;
    animation: floatHint 1.8s ease-in-out infinite;
}

.scroll-indicator i {
    font-size: 16px;
}

@keyframes heroTitle {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: none; }
}

@keyframes heroText {
    from { opacity: 0; transform: translateY(50px); }
    to   { opacity: 1; transform: none; }
}

@keyframes floatHint {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===========================================
   Buttons
=========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2a9fd8, #3bcfef);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(42,159,216,.35);
}

.btn-secondary {
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.9);
}

.btn-secondary:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.28);
}

/* ===========================================
   Sections
=========================================== */

.section {
    max-width: 1300px;
    margin: auto;
    padding: 72px 25px;
}

.section-small {
    padding: 36px 25px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
}

.section-title span {
    display: inline-block;
    color: rgba(180,220,255,.7);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title h2 {
    font-size: 36px;
    margin-bottom: 14px;
    color: #fff;
}

.section-title p {
    color: var(--text2);
    line-height: 1.8;
    max-width: 680px;
    margin: auto;
}

/* ===========================================
   Grid
=========================================== */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    align-items: start;
}

/* ===========================================
   Link Cards
=========================================== */

.link-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    min-height: 240px;
    text-decoration: none;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    overflow: hidden;
    transition: var(--transition);
}

.link-card:hover {
    transform: translateY(-8px);
    background: var(--card-hover);
    box-shadow: var(--shadow);
    border-color: rgba(59,185,255,.2);
}

.link-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2a9fd8, #6ee7ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: .35s;
}

.link-card:hover::before { transform: scaleX(1); }

.link-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,185,255,.1);
    font-size: 28px;
    color: rgba(180,225,255,.85);
    transition: .35s;
}

.link-card:hover .link-icon {
    transform: scale(1.1) rotate(6deg);
    background: #2a9fd8;
    color: white;
}

.link-card h3 {
    font-size: 20px;
    color: #fff;
}

.link-card p {
    line-height: 1.8;
    color: var(--text2);
    flex: 1;
    font-size: 14px;
}

.link-badge {
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,.08);
    color: rgba(200,230,255,.8);
    border: 1px solid rgba(255,255,255,.1);
}

.badge-sns {
    background: rgba(255,60,100,.08);
    color: rgba(255,180,210,.85);
    border-color: rgba(255,60,100,.15);
}

.badge-support {
    background: rgba(34,197,94,.08);
    color: rgba(150,255,180,.85);
    border-color: rgba(34,197,94,.15);
}

.badge-info {
    background: rgba(147,51,234,.08);
    color: rgba(210,170,255,.85);
    border-color: rgba(147,51,234,.15);
}

/* ===========================================
   Search Box
   ※ 現在は未使用のため削除済み。
   もし後で復活する場合は、ここに再実装してください。
=========================================== */

/* ===========================================
   Category Collapse
=========================================== */

.links-category { margin-bottom: 56px; }
.links-category:last-child { margin-bottom: 0; }

.links-category h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 16px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
    font-size: 22px;
    color: rgba(220,240,255,.9);
    user-select: none;
}

.links-category h2 i { transition: .3s; color: var(--text2); font-size: 16px; }
.links-category.collapsed h2 i { transform: rotate(-90deg); }
.links-category.collapsed .grid { display: none; }

/* ===========================================
   Server Grid (map page)
=========================================== */

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.server-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.server-card:hover {
    transform: translateY(-8px);
    background: var(--card-hover);
    box-shadow: var(--shadow);
    border-color: rgba(59,185,255,.2);
}

.server-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,185,255,.1);
    font-size: 24px;
    color: rgba(180,225,255,.85);
    transition: .35s;
}

.server-card:hover .server-icon {
    background: #2a9fd8;
    color: white;
    transform: scale(1.08) rotate(5deg);
}

.server-card h3 { font-size: 20px; color: #fff; }

.server-card > p {
    color: var(--text2);
    line-height: 1.8;
    flex: 1;
    font-size: 14px;
}

.server-info {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--text2);
    font-size: 13px;
}

.server-info li { display: flex; align-items: center; gap: 8px; }
.server-info i { color: rgba(180,220,255,.6); width: 14px; text-align: center; }

/* ===========================================
   Info Grid
=========================================== */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.info-card {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px 28px;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
}

.info-card i {
    font-size: 2rem;
    color: rgba(180,220,255,.7);
    margin-bottom: 18px;
    display: block;
}

.info-card h3 { margin-bottom: 12px; font-size: 18px; color: #fff; }
.info-card p  { color: var(--text2); line-height: 1.8; font-size: 14px; }

/* ===========================================
   Connect Cards
=========================================== */

.connect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 52px;
}

.connect-card {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.connect-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59,185,255,.25);
    box-shadow: 0 20px 50px rgba(0,0,0,.3);
}

.connect-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a7aaa, #1d9be6);
    font-size: 1.8rem;
    color: #fff;
}

.connect-card h3 { margin-bottom: 16px; font-size: 1.4rem; color: #fff; }

.server-address {
    background: rgba(0,0,0,.35);
    padding: 14px;
    border-radius: 10px;
    font-family: monospace;
    font-size: 1rem;
    letter-spacing: .5px;
    margin-bottom: 10px;
    user-select: all;
    color: rgba(200,230,255,.9);
}

.server-port { color: var(--text2); margin-bottom: 18px; font-size: 14px; }

.copy-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    padding: 13px;
    border-radius: 10px;
    background: #2a9fd8;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    transition: .25s;
}

.copy-btn:hover { background: #1d88bf; transform: translateY(-2px); }

/* ===========================================
   CTA
=========================================== */

.cta {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, #1a6ea8, #1a9bcc);
    border-radius: 24px;
    overflow: hidden;
    margin: 60px 25px;
    position: relative;
}

.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(255,255,255,.08), transparent 60%);
}

.cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 18px;
    color: white;
    position: relative;
}

.cta p {
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.9;
    color: rgba(255,255,255,.8);
    font-size: 16px;
    position: relative;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.cta .btn-primary {
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.3);
    color: white;
}

.cta .btn-primary:hover { background: rgba(255,255,255,.3); }

.cta .btn-secondary {
    border-color: rgba(255,255,255,.3);
    background: transparent;
    color: rgba(255,255,255,.85);
}

.cta .btn-secondary:hover { background: rgba(255,255,255,.12); }

/* ===========================================
   Footer
=========================================== */

footer {
    margin-top: 80px;
    padding: 56px 20px 0;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.9fr);
    gap: 40px;
    padding-bottom: 50px;
    max-width: 1300px;
    margin: auto;
    align-items: start;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.footer-links-group {
    min-width: 0;
}

.footer-grid h3,
.footer-grid h4 { margin-bottom: 14px; color: rgba(220,240,255,.9); }

.footer-grid p  { color: var(--text2); line-height: 1.8; font-size: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }

.footer-grid a {
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}

.footer-grid a:hover { color: rgba(180,220,255,.9); }

.footer-bottom {
    max-width: 1300px;
    margin: auto;
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 22px 0;
    color: rgba(255,255,255,.3);
    font-size: .85rem;
}

@media (max-width: 700px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.footer-bottom a {
    color: rgba(255,255,255,.4);
    text-decoration: none;
    transition: color .2s;
}

.footer-bottom a:hover { color: rgba(180,220,255,.7); }

/* ===========================================
   Back To Top
=========================================== */

#backToTop {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: #2a7aaa;
    color: #fff;
    font-size: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: .3s;
    z-index: 999;
}

#backToTop.show { opacity: 1; pointer-events: auto; }
#backToTop:hover { background: #1d9be6; transform: translateY(-3px); }

/* ===========================================
   Breadcrumb
=========================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text2);
    font-size: 13px;
}

.breadcrumb a { color: rgba(180,220,255,.7); text-decoration: none; }
.breadcrumb a:hover { color: rgba(200,235,255,.9); }

/* ===========================================
   Fade Animation
=========================================== */

.fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .7s ease, transform .7s ease;
}

.fade.show { opacity: 1; transform: none; }

/* ===========================================
   Ripple
=========================================== */

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple .5s linear;
    background: rgba(255,255,255,.2);
    pointer-events: none;
}

@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ===========================================
   Floating
=========================================== */

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-7px); }
}

.float { animation: floating 4s ease-in-out infinite; }

/* ===========================================
   Responsive
=========================================== */

@media (max-width: 1100px) {
    .hero h1 { font-size: 52px; }
    .section { padding: 64px 25px; }
}

@media (max-width: 900px) {
    .hamburger { display: flex; }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #08111f;
        flex-direction: column;
        padding: 22px;
        display: none;
        border-bottom: 1px solid var(--border);
        gap: 18px;
    }

    .nav-menu.active { display: flex; }

    .hero         { padding: 80px 20px 70px; }
    .hero h1      { font-size: 40px; }
    .hero p       { font-size: 16px; }

    .footer-grid  { grid-template-columns: 1fr; text-align: center; gap: 28px; }
    .connect-grid { grid-template-columns: 1fr; }
    .info-grid    { grid-template-columns: 1fr; }

    .cta { padding: 56px 24px; margin: 40px 15px; }
}

@media (max-width: 600px) {
    .logo { font-size: 21px; }

    .hero   { padding: 64px 20px 56px; }
    .hero h1 { font-size: 32px; }

    .section-title h2 { font-size: 28px; }

    .link-card { min-height: auto; }

    .cta { padding: 48px 20px; margin: 28px 10px; }

    .btn { width: 100%; justify-content: center; }

    #backToTop { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
