@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
    --font-main: "Google Sans", sans-serif;
    --font-title: "Press Start 2P", sans-serif;
    --bg-body: #101010;
    --accent2: rgba(28, 28, 28, 0.8);
    --accent3: rgba(48, 48, 48, 0.9);
    --border-color: #343434;
    --text-main: #ffffff;
    --text-muted: #808080;
    
    --sphere-1: rgba(0, 255, 191, 0.3);
    --sphere-2: rgba(160, 64, 255, 0.25);
    --sphere-3: rgba(0, 150, 255, 0.2);

    --icon-filter: invert(40%) sepia(66%) saturate(1%) hue-rotate(314deg) brightness(97%) contrast(92%);
    --icon-active-filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);

    --badge-admin: #ff4757;
    --badge-sub: #53439b;
    --badge-dev: #2ecc71;

    --react-badge-bg: #005e17;
    --green-accent: #005e37;

    --fx-particle-main: #ffffff;
    --fx-particle-glow: rgba(255, 255, 255, 0.4);

    --fx-snow: invert(0%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

html {
    background-color: var(--bg-body);
}

body.light-mode {
    --bg-body: #ffffff;
    --accent2: rgba(204, 204, 204, 0.65);
    --accent3: rgba(255, 255, 255, 0.753);
    --border-color: #bebebe;
    --text-main: #000000;
    --text-muted: #606060;
    
    --sphere-1: rgba(0, 255, 191, 0.959);
    --sphere-2: rgba(160, 64, 255, 0.712);
    --sphere-3: rgba(0, 149, 255, 0.747);

    --icon-filter: invert(70%) sepia(66%) saturate(1%) hue-rotate(314deg) brightness(97%) contrast(92%);
    --icon-active-filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);

    --badge-admin: #ff4757;
    --badge-sub: #53439b;
    --badge-dev: #1a914b;

    --green-accent: #1a914b;

    --react-badge-bg: #ff3b3b;

    --fx-particle-main: #444444; /* На светлом фоне делаем частицы темнее */
    --fx-particle-glow: rgba(0, 0, 0, 0.1);

    --fx-snow: invert(44%) sepia(98%) saturate(2471%) hue-rotate(165deg) brightness(99%) contrast(101%);
}

.particle {
    position: absolute;
    top: -50px;
    pointer-events: none;
    user-select: none;
    font-family: Arial, sans-serif;
    will-change: transform;
    /* Если в JS не задан цвет, берем из темы */
    color: var(--fx-particle-main);
    text-shadow: 0 0 5px var(--fx-particle-glow);
}


#fx-overlay {
    position: fixed; /* Чтобы эффекты были поверх всего фона */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Чтобы не мешали нажимать кнопки */
    z-index: 5; /* Выше фона, но ниже контента */
    overflow: hidden;
}

@keyframes orbit1 {
    0% { transform: translate(-70%, -30%) scale(1); }
    50% { transform: translate(-30%, -70%) scale(1.2); }
    100% { transform: translate(-70%, -30%) scale(1); }
}

@keyframes orbit2 {
    0% { transform: translate(-20%, -20%) scale(1.1); }
    50% { transform: translate(-80%, -80%) scale(0.9); }
    100% { transform: translate(-20%, -20%) scale(1.1); }
}

@keyframes orbit3 {
    0% { transform: translate(-50%, -80%) scale(0.8); }
    50% { transform: translate(-50%, -20%) scale(1.3); }
    100% { transform: translate(-50%, -80%) scale(0.8); }
}

@keyframes menuPop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


@keyframes ptr-spin {
    to { transform: rotate(360deg); }
}

@keyframes fall-straight {
    0% { transform: translateY(-50px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(110vh); opacity: 0; }
}

@keyframes fall-rotate {
    0% { 
        transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateX(0); 
        opacity: 0; 
    }
    10% { opacity: 1; }
    100% { 
        transform: translateY(110vh) rotateX(720deg) rotateY(360deg) rotateZ(180deg) translateX(50px); 
        opacity: 0; 
    }
}

.particle[src*="rain"], .particle[src*="snow"]
{
    filter: var(--fx-snow);
}
