/* styles.css */
:root {
    /* Основные цвета темы */
    --primary-color: #e6e6fa; /* Лаванда */
    --secondary-color: #c5d0e6; /* Барвинок */
    --secondary-color-opacity: #c5d0e688;
    --tertiary-color: #afdafc; /* Синий-синий иней */
    --tertiary-color-opacity: #afdafc88;
    --text-color: #1a162a; /* Тёмный пурпурно-синий */
    --text-color-opacity: #1a162a99;
    --text-color-hover: #413d51; /* Серовато-пурпурно-синий */
    --text-color-light: #837da2; /* Светлый пурпурно-синий */
    /* */
    --shift-duration: 0.5s;
    --shift-distance: 3px;
    --content-width: 67vw;
    --content-padding-hor: 3vw;
    --content-padding-ver: 3vh;
    --content-margin-ver: 1vh;
    --default-text-size: 1.4rem;
    --modal-anim-duration: 0.25s;
    --follower-state: visible;
    --bezier: cubic-bezier(0.1, 0.4, 1.0, 0.1);
}

/* Тёмная тема */
/* :root[data-theme="dark"] {
    --primary-color: #4a5578;
    --secondary-color: #4b4672;           
    --secondary-color-opacity: #4b467288;
    --tertiary-color: #373e57;
    --tertiary-color-opacity: #373e5788;
    --quaternary-color: #161a1e;
    --text-color: #e0dfff;
    --text-color-opacity: #e0dfff99;
    --text-color-hover: #b8b0d0;
    --text-color-light: #a098c0;
} */
:root[data-theme="dark"] {
    --primary-color: #141613; /* Черновато-зелёный */
    --secondary-color: #16251c; /* Очень тёмный зелёный */         
    --secondary-color-opacity: #16251c88;
    --tertiary-color: #44944a; /* Арлекин */
    --tertiary-color-opacity: #44944a88;
    --text-color: #f0fff0; /* Медовая роса */
    --text-color-opacity: #f0fff099;
    --text-color-hover: #aaf0d1; /* Магическая мята */
    --text-color-light: #ffffff;
}

* {
    font-family: 'Glametrix', sans-serif;
    font-size: var(--default-text-size);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    min-width: 40vh;
    padding: 8px;
    padding-bottom: 24px;
    background:
        /* radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 50%), */
        /* linear-gradient(120deg, 
            var(--primary-color) 0%,
            var(--secondary-color) 100%); */
        var(--primary-color);
    color: var(--text-color);
    background-blend-mode: soft-light;
    isolation: isolate;
    z-index: -2;
    animation: fadeIn var(--shift-duration) forwards;
    opacity: 0;
}

.cursor-follower {
    /* width: 20px;
    height: 100px; */
    font-weight: bold;
    /* background: linear-gradient(
        to bottom,
        var(--primary-color),
        var(--quaternary-color)
    ); */
    /* border-radius: 10px; */
    color: var(--tertiary-color);
    position: fixed;
    top: 40vh;
    right: 8vw;
    text-align: start;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    /* box-shadow: 0 4px 8px rgba(0,0,0,0.2); */
    z-index: -1;
    user-select: none;
    visibility: var(--follower-state);
}

.bigbrain {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    /* opacity: 0; */
    width: var(--content-width);
    margin-top: var(--content-margin-ver);
    margin-bottom: var(--content-margin-ver);
}

.contenter {
    display: flex;
    flex-direction: column;
    /* opacity: 0; */
    text-align: justify;
    align-self: center;
    width: var(--content-width);
}

.contenter iframe, .bigbrain iframe, .piss iframe {
    width: 100%;
    height: 60vh;
    border-radius: 40px;
    border: 0px none;
    margin-top: 1vh;
    margin-bottom: 1vh;
    background-color: black;

}

.bigheader {
    font-size: calc(2.75 * var(--default-text-size));
    color: var(--text-color);
    text-align: center;
    animation: pulse 2s infinite;
    user-select: none;
}

.medheader {
    font-size: calc(2 * var(--default-text-size));
    color: var(--text-color);
    text-align: center;
    animation: pulse 4s infinite;
    user-select: none;
}

.bigheader img, .medheader img {
    width: 100%;
    height: auto;
    margin-top: var(--content-margin-ver);
    /* margin-bottom: var(--content-margin-ver);*/
}

.buttcunt {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: calc( 0.5 * var(--content-width));
    margin: auto;
    margin-top: var(--content-margin-ver);
    margin-bottom: var(--content-margin-ver);
}

.buttcunt button {
    width: 100%;
}

.buttcunt button img {
    width: 100%;
    align-self: center;
}


.watermark {
    display: flex;
    font-size: calc(1.0 * var(--default-text-size));
    color: var(--text-color-hover);
    text-align: center;
    opacity: 0.8;
    text-align: center;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.piss {
    font-size: var(--default-text-size);
    color: var(--text-color);
    text-align: justify;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
    line-height: var(--default-text-size);
    margin-top: var(--content-margin-ver);
    margin-bottom: var(--content-margin-ver);
    padding-left: var(--content-padding-hor);
    padding-right: var(--content-padding-hor);
    padding-top: var(--content-padding-ver);
    padding-bottom: var(--content-padding-ver);
    border: 0px solid var(--text-color);
    border-radius: 80px;
    background: var(--secondary-color-opacity);
    /* transition: all calc(0.5 * var(--shift-duration)) ease; */
    /* backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); для Safari */
}

/* .piss button {
    background-color: var(--secondary-color);
} */

/* .piss:hover {
    background: var(--tertiary-color);
} */

button {
    font-size: var(--default-text-size);
    font-weight: bold;
    color: var(--text-color);
    transition: all var(--shift-duration) ease;
    padding: 1vh;
    margin-bottom: var(--content-margin-ver);
    border: 0px solid var(--text-color);
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background-color: var(--secondary-color);
}

button:hover {
    color: var(--text-color-hover);
    transform: scale(1.025);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-color: var(--tertiary-color);
}

.ghbutton, .piss .ghbutton {
    color: #F0F6FC;
    background-color: #010409;
}

.ghbutton:hover, .piss .ghbutton {
    color: #F78166;
    background-color: #0D1117;
}

.theme-toggle, .home-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background-color: var(--secondary-color);
}

.theme-toggle:hover, .home-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-color: var(--tertiary-color);
}

.home-toggle {
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
}

.theme-toggle:active {
    transform: scale(0.95);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-between;
    overflow: visible;
    position: relative;
    user-select: none;
}

.gallery-item {
    width: calc(50% - var(--content-margin-ver));
    margin-top: var(--content-margin-ver);
    margin-bottom: var(--content-margin-ver);
    margin-inline: 0px;
    overflow: hidden;
    border-radius: 80px;
    text-align: center;
    align-content: center;
    transition: all var(--shift-duration);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    background-color: var(--secondary-color);
}

.gallery-item:hover {
    transform: scale(1.025) rotate(0deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    animation: fadeIn var(--modal-anim-duration) forwards;
    user-select: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* для Safari */
    cursor: pointer;
    background-color: var(--secondary-color-opacity);
}

.modal.animate-close {
    animation: fadeOut var(--modal-anim-duration) forwards;
}

.modal-content {
    /* background-color: transparent; */
    margin: 10vh auto;
    border: 0px none;
    border-radius: 80px;
    width: var(--content-width);
    max-height: 90%;
    overflow: auto;
    position: relative;
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.3);
    cursor: default;
    background-color: var(--tertiary-color-opacity);
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    margin: auto;
}

.spoiler-label {
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size:  calc(1.5 * var(--default-text-size));
    transition: all var(--shift-duration) ease;
    text-align: center;
    cursor: pointer;
}

.spoiler-label:hover {
    text-shadow: 0 12px 16px rgba(0, 0, 0, 0.3);
    transform: scale(1.025) rotate(0deg);
}

.spoiler-input {
    display: none;
}

.spoiler-content {
    max-height: 0;
    overflow: hidden;
    transition: all calc(2 * var(--shift-duration)) ease;
    /* margin-top: var(--content-margin-ver);
    margin-bottom: var(--content-margin-ver); */
    padding-top: 0;
}

.spoiler-input:checked ~ .spoiler-content {
    max-height: 1440px; /* Достаточно большое значение для контента */
    padding-top: var(--content-padding-ver);
}

/* .spoiler-input:checked ~ .spoiler-label {
    border-radius: 5px 5px 0 0;
} */

@keyframes pulse {
    0% {
        transform: scale(1);
        color: var(--text-color);
    }
    50% {
        transform: scale(1.05);
        color: var(--text-color-hover);
    }
    100% {
        transform: scale(1);
        color: var(--text-color);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@font-face {
    font-family: 'Glametrix';
    src: url('../fonts/Glametrix.otf') format('opentype');
    font-style: normal;
}

@font-face {
    font-family: 'Glametrix';
    src: url('../fonts/GlametrixBold.otf') format('opentype');
    font-weight: bold;
}

@media (max-width: 1280px) {
    :root {
    --content-width: 85%;
    }
    :root {
        --default-text-size: 1.425rem;
    }
    :root {
        --content-padding-hor: 4vw;
    }
    :root {
        --content-padding-ver: 4vh;
    }
    :root {
        --follower-state: visible;
    }
}

@media (max-width: 900px) {
    :root {
        --content-width: 95%;
    }
    :root {
        --default-text-size: 1.275rem;
    }
    :root {
        --content-padding-hor: 4.25vw;
    }
    :root {
        --content-padding-ver: 4.25vh;
    }
    :root {
        --follower-state: hidden;
    }
}

@media (max-width: 800px) {
    :root {
        --default-text-size: 1.15rem;
    }
}

::selection {
    background: var(--tertiary-color);
    color: var(--text-color-light);
}

::-moz-selection {
    background: var(--tertiary-color);
    color: var(--text-color-light);
}
