* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

:root {
    --brand-color: #1bd96a;
    --brand-gradient: linear-gradient(135deg, #1bd96a 0%, #11a850 100%);
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0f0f;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

.loader {
    width: 50px;
    height: 50px;
    position: relative;
}

.loader::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    border-top-color: #1bd96a;
    animation: spin 1s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

@media screen and (min-width: 2560px) {
    .container {
        padding: 2rem 1.5rem;
    }
    
    .link-card {
        padding: 1.2rem;
    }
    
    footer {
        padding: 1rem;
    }
}

@media screen and (min-resolution: 300dpi) {
    html {
        overflow-x: hidden;
        width: 100%;
    }
    
    body {
        min-width: 320px;
        overflow-x: hidden;
    }
    
    .container {
        padding: 1rem;
    }
}

header {
    background: rgba(27, 217, 106, 0.05);
    transform: translateZ(0);
    text-align: center;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.03, 0.78, 0.52, 0.97);
    margin: 0 auto;
    padding: 3rem;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--brand-gradient);
    opacity: 0.1;
    animation: rotate 20s linear infinite;
    z-index: -1;
}

header::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 2px solid var(--brand-color);
    border-radius: 22px;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: min(1400px, 95%);
    margin: 0 auto;
    width: 100%;
    flex: 1;
    padding: 2rem 1rem;
    box-sizing: border-box;
    overflow: visible;
}

.parallax-container {
    perspective: 1000px;
    margin: 0 -2rem;
    padding: 2rem;
}

body {
    background: #0f0f0f;
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    background: var(--brand-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textScale 3s ease-in-out infinite alternate;
}

.vk { color: #4a76a8; }
.youtube { color: #ff0000; }
.twitch { color: #9146ff; }
.instagram { color: #e1306c; }
.telegram { color: #0088cc; }
.steam { color: #acacac; }
.namemc { color: var(--brand-color); }
.donationalerts { color: #ff4242; }
.modrinth { color: #1BD96A; }
.discord { color: #5662F6; }
.clicker { color: #fff; }
.chest { color: #ffde21; }
.cube-icon { color: #fff; }

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


@keyframes shine {
    0% { transform: rotate(0deg) translateX(-50%); }
    100% { transform: rotate(360deg) translateX(50%); }
}

@keyframes textGlow {
    from { text-shadow: 0 0 10px rgba(0,163,255,0.3); }
    to { text-shadow: 0 0 30px rgba(0,163,255,0.6); }
}

@keyframes textFlow {
    0%, 100% {
        background-size: 200% 200%;
        background-position: left center;
    }
    50% {
        background-size: 200% 200%;
        background-position: right center;
    }
}

@keyframes rotation {
    0% { transform: rotate(0deg) }
    100% { transform: rotate(360deg) }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes headerGlow {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.9;
    }
    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
}

@keyframes textScale {
    0% { transform: scale(0.98); }
    100% { transform: scale(1.02); }
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.link-card::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(27, 217, 106, 0.1),
        transparent
    );
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    z-index: -1;
    content: '';
}

.link-card {
    transition: 
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;

    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    text-decoration: none;
    border-radius: 15px;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    color: inherit;
    display: flex;
    z-index: 1;
    gap: 1rem;
}

.link-card:hover::before {
    left: 100%;
    transition-duration: 0.4s;
}

.link-card:hover {
    box-shadow: 0 10px 20px rgba(27, 217, 106, 0.1);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--brand-color);
    box-shadow: 0 10px 20px rgba(27, 217, 106, 0.1);

    transform: translateY(-5px) scale(1.02);
    z-index: 2;
}

.link-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.link-text {
    flex: 1;
}

.link-url {
    font-size: 0.9rem;
    opacity: 0.7;
}

.icon {
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window {
    width: 500px;
    position: fixed;
    background: #1E1E1E;
    border-radius: 12px;
    color: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    font-family: -apple-system, sans-serif;
    border: 1px solid #404040;
    user-select: none;
    overflow: hidden;
    z-index: 100;
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #303030;
}

.window-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.close { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27c93f; }

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    user-select: none;
}

.wait-message {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

footer {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

.credits {
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    opacity: 0.7;
    margin: 0 auto;
    max-width: 90%;
    line-height: 1.4;
}

.credits a {
    color: #00ff88;
    text-decoration: none;
}

/* Floating Action Button */
.floating-menu-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.floating-action-button {
    background-color: var(--brand-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.floating-action-button.active {
    transform: rotate(45deg);
}

.floating-menu {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.floating-menu-item {
    background-color: #333;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.floating-menu.active .floating-menu-item {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.floating-menu.active .floating-menu-item:nth-child(1) {
    transition-delay: 0.15s;
}
.floating-menu.active .floating-menu-item:nth-child(2) {
    transition-delay: 0.1s;
}
.floating-menu.active .floating-menu-item:nth-child(3) {
    transition-delay: 0.05s;
}

.floating-menu-item:hover {
    background-color: #444;
    transform: scale(1.1);
}

.floating-menu-item .icon {
    font-size: 20px;
}

#openInventory .icon {
    color: #AD8762;
}

#openClicker .icon {
    color: #F21234;
}

@media screen and (max-width: 768px) {
    .floating-menu-container {
        display: none;
    }
}
