/* ─── Variables ──────────────────────────────────────────────────── */
:root {
    --surface: rgba(255, 255, 255, 0.22);
    --border:  rgba(255, 255, 255, 0.55);
}

/* ─── Base ───────────────────────────────────────────────────────── */
body {
    background: linear-gradient(135deg, #add8e6, #f2a6d2);
    background-size: 500% 500%;
    animation: gradientAnimation 7s ease infinite;
    min-height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

html {
    overflow: hidden;
    height: 100%;
}

@keyframes gradientAnimation {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.center-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44vh;
}

.dflex {
    display: flex;
    gap: 22px;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0;
    animation: fadeInUp 1.5s ease forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    0%   { opacity: 0; transform: translate(-50%, -40%); }
    100% { opacity: 1; transform: translate(-50%, -50%); }
}

/* ─── Social Cards ───────────────────────────────────────────────── */
.dflex a {
    position: relative;
    width: 87px;
    height: 87px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    box-shadow:
        0 4px 24px rgba(255, 255, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15);
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    opacity: 0;
    animation:
        slideInScale 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        float 6s ease-in-out infinite;
    will-change: transform, opacity;
    transition:
        transform   0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow  0.4s ease,
        background  0.4s ease,
        border-color 0.4s ease;
}

/* Liquid glass inner highlight + bottom reflection */
.dflex a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(160deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0.15) 40%,
            transparent 70%,
            rgba(255, 255, 255, 0.08) 100%);
    pointer-events: none;
}

/* Tooltip */
.dflex a::after {
    content: attr(data-label);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    font-size: 9px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    color: rgba(0, 0, 0, 0.5);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.dflex a:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dflex a img {
    width: 45px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    z-index: 2;
    position: relative;
}

/* Stagger delays */
.dflex a:nth-child(1) { animation-delay: 0.8s;  animation-duration: 0.8s, 6s;   }
.dflex a:nth-child(2) { animation-delay: 0.9s;  animation-duration: 0.8s, 7s;   }
.dflex a:nth-child(3) { animation-delay: 1.0s;  animation-duration: 0.8s, 8s;   }
.dflex a:nth-child(4) { animation-delay: 1.1s;  animation-duration: 0.8s, 5s;   }
.dflex a:nth-child(5) { animation-delay: 1.2s;  animation-duration: 0.8s, 7.5s; }
.dflex a:nth-child(6) { animation-delay: 1.3s;  animation-duration: 0.8s, 6.5s; }
.dflex a:nth-child(7) { animation-delay: 1.4s;  animation-duration: 0.8s, 8.5s; }
.dflex a:nth-child(8) { animation-delay: 1.5s;  animation-duration: 0.8s, 5.5s; }

@keyframes slideInScale {
    0%   { opacity: 0; transform: translateY(30px) scale(0.8); }
    100% { opacity: 1; transform: translateY(0)    scale(1);   }
}

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

/* Hover */
.dflex a:hover {
    transform: translateY(-12px) scale(1.08) rotateY(5deg);
    border-color: rgba(255, 255, 255, 0.5);
}

.dflex a:hover img {
    transform: scale(1.15) rotateZ(-5deg);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2)) brightness(1.1) saturate(1.2);
}

.dflex a:active {
    transform: translateY(-8px) scale(1.05) rotateY(2deg);
    transition-duration: 0.1s;
}

/* Platform glow on hover */
.osu:hover     { box-shadow: 0 12px 40px rgba(255,126,179,0.55), 0 0 0 1px rgba(255,126,179,0.3); background: rgba(255,126,179,0.12); }
.steam:hover   { box-shadow: 0 12px 40px rgba(108,43,199,0.55),  0 0 0 1px rgba(108,43,199,0.3);  background: rgba(108,43,199,0.12); }
.discord:hover { box-shadow: 0 12px 40px rgba(88,101,242,0.55),  0 0 0 1px rgba(88,101,242,0.3);  background: rgba(88,101,242,0.12); }
.github:hover  { box-shadow: 0 12px 40px rgba(64,144,204,0.55),  0 0 0 1px rgba(64,144,204,0.3);  background: rgba(64,144,204,0.12); }
.dofus:hover   { box-shadow: 0 12px 40px rgba(112,167,3,0.55),   0 0 0 1px rgba(112,167,3,0.3);   background: rgba(112,167,3,0.12);  }
.youtube:hover { box-shadow: 0 12px 40px rgba(255,0,0,0.55),     0 0 0 1px rgba(255,0,0,0.3);     background: rgba(255,0,0,0.12);    }
.twitch:hover  { box-shadow: 0 12px 40px rgba(146,68,255,0.55),  0 0 0 1px rgba(146,68,255,0.3);  background: rgba(146,68,255,0.12); }
.pc:hover      { box-shadow: 0 12px 40px rgba(82,145,255,0.55),  0 0 0 1px rgba(82,145,255,0.3);  background: rgba(82,145,255,0.12); }

/* ─── Background overlay ─────────────────────────────────────────── */
.background-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: brightness(1.4);
    z-index: -1;
    image-rendering: high-quality;
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media screen and (max-width: 768px) {
    .dflex {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        padding: 0 30px;
        grid-row-gap: 40px;
        grid-column-gap: 80px;
        max-width: 320px;
    }

    .dflex a {
        margin: 0 auto;
        width: 75px;
        height: 75px;
    }

    .dflex a:hover { transform: translateY(-5px) scale(1.08); }
    .dflex a:active { transform: translateY(-3px) scale(1.05); }

    .dflex a img { width: 38px; }

    .osu img, .youtube img { width: 4.5em !important; }
    .github img { width: 3em !important; }
    .dofus img  { width: 1.8em !important; }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .dflex { gap: 20px; }
    .dflex a { width: 80px; height: 80px; }
    .dflex a img { width: 40px; }
}

/* ─── Buttons (unused, kept for reference) ───────────────────────── */
body h1 {
    position: relative;
    text-align: center;
    color: #353535;
    font-size: 50px;
    font-family: "Cormorant Garamond", serif;
}

p {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    text-align: center;
    font-size: 18px;
    color: #676767;
}

.frame {
    width: 90%;
    margin: 40px auto;
    text-align: center;
}

button { margin: 20px; }

.custom-btn {
    width: 130px;
    height: 40px;
    color: #fff;
    border-radius: 5px;
    padding: 10px 25px;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    box-shadow: inset 2px 2px 2px 0px rgba(255,255,255,.5),
                7px 7px 20px 0px rgba(0,0,0,.1),
                4px 4px 5px 0px rgba(0,0,0,.1);
    outline: none;
}
