@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;500;700&family=Russo+One&display=swap');

/* Базовые переменные цветов (неон) */
:root {
    --neon-green: #39ff14;
    --neon-purple: #bd00ff;
    --neon-cyan: #00e5ff;
    --neon-orange: #ff5e00;
}

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

/* Основной фон и общие ограничения прокрутки */
html {
    background-color: #743909;
    overflow-x: hidden;
    height: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    height: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    font-family: 'Comfortaa', cursive;
    background: linear-gradient(160deg, #743909 30%, #2f0a35 70%) no-repeat;
    background-attachment: fixed;
    color: #253b41;
    line-height: 1.6;
    min-height: 100vh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

/* Обёртка контента (центрирование и отступы) */
#content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    width: 95vw;
}

@media (orientation: landscape) and (max-width: 900px) {
    #content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    #content {
        /* фиксируем гармонию отступов: меньше скачков между режимами */
        padding-top: 8px;
        padding-bottom: 8px;
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
        width: 100%;
    }


    .feed-columns {
        gap: 6px;
    }

    .feed-column h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    #ideas-feed .idea-text {
        font-size: 0.7rem;
        margin-bottom: 6px;
        line-height: 1.3;
    }

    #ideas-feed .simple-card {
        padding: 8px;
        margin-bottom: 8px;
        min-height: 80px;
    }
}


@media (max-width: 415px) {
    #content {
        padding-top: 6px;
        padding-bottom: 6px;
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }


    .feed-columns {
        gap: 4px;
    }

    .feed-column h3 {
        font-size: 0.75rem;
        margin-bottom: 6px;
        letter-spacing: 0.5px;
    }

    #ideas-feed .idea-text {
        font-size: 0.6rem;
        margin-bottom: 4px;
        line-height: 1.25;
    }

    #feed-humans .simple-card,
    #feed-robots .simple-card {
        padding: 6px;
        margin-bottom: 6px;
        min-height: 60px;
    }

    .like-badge {
        font-size: clamp(0.65rem, 2.2vw, 0.85rem);
        padding: 4px 10px;
        gap: 6px;
    }

    .vote-btn {
        width: 38px;
        height: 38px;
        border-radius: 8px;
        margin-left: 0;
    }

    .vote-btn svg {
        width: 22px;
        height: 22px;
    }
}





@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes stripeScroll {

    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

@keyframes arrowBounceUp {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.header-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;

    /* Безопасная зона под "чёлкой" (iPhone). */
    padding-top: env(safe-area-inset-top, 10px);

    padding-bottom: 10px;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 20px;
    width: 100%;
    flex-wrap: wrap;
}

/* iOS иногда визуально "подминает" верх. Если safe-area поддерживается,
   то убираем любые лишние фиксированные отступы и кладём шапку строго ниже notch. */
@supports (padding: max(0px)) {
    .header-container {
        padding-top: max(env(safe-area-inset-top, 0px), 6px);
    }
}


.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-end;
    width: 100%;
}

@media (max-width: 415px) {
    .header-controls {
        gap: 8px;
    }

    .simple-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
    }

    .lang-switcher button {
        font-size: 0.75rem;
    }
}

@media (max-width: 350px) {
    .header-controls {
        gap: 6px;
    }

    .simple-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .lang-switcher button {
        font-size: 0.7rem;
    }
}

h1 {
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 5.5vw, 3.2rem);
    margin: 0 0 20px 0;
    text-align: center;

    white-space: normal;
    word-break: break-word;
    hyphens: auto;

    background: repeating-linear-gradient(180deg,
            #ffffff 0px,
            #ffffff 2px,
            var(--neon-green) 3px,
            var(--neon-purple) 4px);
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: stripeScroll 6s linear infinite;
    will-change: background-position;
    text-transform: uppercase;
    letter-spacing: clamp(0.5px, 0.5vw, 2px);
    filter: drop-shadow(0 0 15px rgba(57, 255, 20, 0.4));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 8px;
    line-height: 1.2;
}

@media (max-width: 415px) {
    h1 {
        /* мобильный: чуть компактнее для гармонии */
        font-size: clamp(0.98rem, 5.6vw, 1.45rem);
        margin: 0 0 14px 0;
        letter-spacing: 0.45px;
        padding: 0 2px;
    }
}







h2 {
    font-family: 'Russo One', sans-serif;
    font-size: 1.5rem;
    color: var(--neon-green);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--neon-green);
    display: inline-block;
    padding-bottom: 5px;
    background: repeating-linear-gradient(180deg, #fff 0px, #fff 2px, #39ff14 3px, #39ff14 4px);
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: stripeScroll 10s linear infinite;
}

.simple-card {
    background: rgba(10, 15, 20, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    clip-path: polygon(25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%, 0 25px);
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s ease,
        background 0.4s ease,
        border-color 0.4s ease;
    animation: fadeInUp 0.7s ease-out forwards;
    transform: translateZ(0);
    will-change: transform, box-shadow;
    contain: content;
    word-wrap: break-word;
    overflow-x: hidden;
    color: #ffffff;
}

.simple-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px;
    background: conic-gradient(from var(--angle), transparent 70%, var(--neon-green), var(--neon-purple), var(--neon-cyan));
    clip-path: polygon(25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%, 0 25px);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotateBorder {
    to {
        --angle: 360deg;
    }
}

.simple-card::before {
    opacity: 0;
    animation: none;
}

#project-info.simple-card::before,

#nft-section.simple-card::before {
    opacity: 1;
    animation: rotateBorder 5s linear infinite;
}

#feed-humans .simple-card::before,
#feed-robots .simple-card::before {
    opacity: 0;
    animation: none;
}

@keyframes ideaPulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(0, 229, 255, 0);
        background: rgba(0, 229, 255, 0.18);
    }

    50% {
        box-shadow: 0 0 35px rgba(0, 229, 255, 0.35);
        background: rgba(0, 229, 255, 0.28);
    }
}

@keyframes ideaPulseGlowHuman {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(255, 94, 0, 0);
        background: rgba(255, 94, 0, 0.12);
    }

    50% {
        box-shadow: 0 0 35px rgba(255, 94, 0, 0.35);
        background: rgba(255, 94, 0, 0.22);
    }
}

#project-info:hover,
#nft-section:hover,
.simple-card:hover {
    background: rgba(10, 15, 20, 0.4);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(189, 0, 255, 0.4);
    border-color: rgba(189, 0, 255, 0.5);
    z-index: 10;
}

#project-info h2 {
    font-size: clamp(1.0rem, 2.2vw, 1.45rem);
}

#project-info p {
    font-size: clamp(0.85rem, 1.6vw, 1.05rem);
    line-height: 1.4;
}

/* About block */
.about-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: clamp(0.95rem, 3.6vw, 1.25rem);
    line-height: 1.2;
}

.about-desc {
    font-size: clamp(0.78rem, 1.5vw, 1.02rem);
    line-height: 1.45;
}

#about-info.simple-card::before {
    opacity: 1;
    animation: rotateBorder 4s linear infinite;
}

#about-info {
    position: relative;
    animation: fadeInUp 0.7s ease-out forwards;
}

.simple-input {
    width: 100%;
    padding: 15px;
    background: rgba(0, 15, 10, 0.6);
    border: 1px solid var(--neon-green);
    color: #fff;
    font-family: 'Comfortaa', cursive;
    font-size: 1rem;
    margin-bottom: 20px;
    outline: none;
    transition: box-shadow 0.3s ease, background 0.3s ease;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.simple-input:focus {
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
    background: rgba(10, 30, 20, 0.8);
}

.simple-btn {
    background: transparent;
    border: 1px solid var(--neon-purple);
    color: var(--neon-purple);
    padding: clamp(8px, 1.4vw, 12px) clamp(14px, 3vw, 30px);
    font-family: 'Russo One';
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    white-space: nowrap;
    font-size: clamp(0.75rem, 1.4vw, 1rem);
}


.simple-btn:hover {
    background: #bd00ff;
    color: #fff;
    box-shadow: 0 0 40px #bd00ff;
    transform: scale(1.05);
}

/* iOS Safari при клике иногда "переклеивает" :hover/ :active,
   из-за чего выглядит как мерцание фона кнопки. Зафиксируем состояние. */
.simple-btn:active {
    -webkit-tap-highlight-color: transparent;
}

@media (hover: none) and (pointer: coarse) {
    .simple-btn:active {
        background: #bd00ff;
        color: #fff;
        transform: scale(1.05);
        box-shadow: 0 0 40px #bd00ff;
    }
}


.simple-btn.primary {
    background: #bd00ff;
    color: #fff;
    border: none;
}

.simple-btn.primary:hover {
    background: #fff;
    color: #bd00ff;
    box-shadow: 0 0 40px #fff;
}

#ideas-feed {
    text-align: center;
}

#ideas-feed h2 {
    display: inline-block;
    margin-top: 48px;
    margin-bottom: 24px;
    font-size: clamp(1rem, 2.2vw, 1.55rem);
}

@media (max-width: 415px) {
    #ideas-feed h2 {
        margin-top: 32px;
        margin-bottom: 16px;
    }
}

@media (max-width: 350px) {
    #ideas-feed h2 {
        margin-top: 26px;
        margin-bottom: 12px;
    }
}

.feed-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    align-items: start;
}

@media (min-width: 900px) {
    .feed-columns {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .feed-columns {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .feed-columns {
        grid-template-columns: 1fr 1fr;
    }

    .feed-column[data-feed-col="3"] {
        display: none;
    }
}

/* На стыке мобильный/планшет без дерганий: фиксируем отображение 3-й колонки
   в промежутке, где JS может успевать/не успевать перерисовать DOM. */
@media (min-width: 769px) and (max-width: 899px) {
    .feed-column[data-feed-col="3"] {
        display: block;
    }
}

@media (max-width: 415px) {
    .feed-columns {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .feed-column[data-feed-col="3"] {
        display: none;
    }

    .feed-column {
        min-width: 0;
    }

    .feed-column h3 {
        display: none;
    }
}

@media (max-width: 350px) {
    .feed-columns {
        gap: 8px;
    }
}

.feed-column {
    min-width: 0;
}

.feed-column h3 {
    text-align: center;
    font-family: 'Russo One';
    font-size: 1.3rem;
    margin-bottom: 20px;
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: stripeScroll 12s linear infinite;
}

@media (max-width: 415px) {
    .feed-column h3 {
        font-size: 0.75rem;
        margin-bottom: 6px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 350px) {
    .feed-column h3 {
        font-size: 0.7rem;
        margin-bottom: 4px;
        letter-spacing: 0.3px;
    }
}

#ideas-feed .simple-card {
    padding: 20px;
    min-height: 120px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.author-id-label {
    color: #e1c432;

}

.author-id-label-text {
    color: #e1c432;
}

.author-id-value {
    color: #30c715;

}

#feed-humans .human-idea:hover {
    transform: translateY(-8px) scale(1.05);
    z-index: 20;
    animation: ideaPulseGlowHuman 1.6s ease-in-out infinite;
    box-shadow: 0 0 35px rgba(255, 94, 0, 0.35);
}

#feed-robots .robot-idea:hover {
    transform: translateY(-8px) scale(1.05);
    z-index: 20;
    animation: ideaPulseGlow 1.6s ease-in-out infinite;
    box-shadow: 0 0 35px rgba(0, 229, 255, 0.35);
}

/* Текст идеи */
#ideas-feed .simple-card .idea-text,
#ideas-feed .idea-text {
    font-size: clamp(0.65rem, 2.1vw, 1.02rem);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin: 0 0 10px 0;
    line-height: 1.35;
    font-weight: 500;
    word-break: break-word;
    hyphens: auto;
}

/* Линия голосования (like + кнопка) */
#ideas-feed .idea-vote-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 6px;
    gap: 10px;
}

/* Метаданные: ID автора + дата */
#ideas-feed .idea-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-top: 6px;
}

#ideas-feed .idea-meta .author-meta,
#ideas-feed .idea-meta .created-at {
    /* мета всегда меньше текста идеи */
    font-size: clamp(0.52rem, 1.55vw, 0.86rem);
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.85);
}

#ideas-feed .idea-meta .author-meta {
    color: rgba(255, 255, 255, 0.9);
}

#ideas-feed .author-id-label-text {
    color: #e1c432;
}

#ideas-feed .author-id-value {
    color: #30c715;
}

#ideas-feed .created-at {
    color: rgba(255, 255, 255, 0.65);
}


.vote-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.like-badge {
    font-family: 'Comfortaa', cursive;
    font-weight: 700;
    font-size: clamp(0.7rem, 2.5vw, 1.0rem);
    color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.35);
    padding: 6px 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

.vote-btn {
    width: clamp(32px, 5vw, 44px);
    height: clamp(32px, 5vw, 44px);
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: clamp(8px, 1.4vw, 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 0;
}

.vote-btn svg {
    width: clamp(18px, 3.2vw, 28px);
    height: clamp(18px, 3.2vw, 28px);
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 1px var(--neon-cyan)) drop-shadow(0 0 3px rgba(0, 229, 255, 0.5));
    transition: transform 0.3s ease;
}


.vote-btn path {
    fill: rgba(0, 229, 255, 0.15);
    stroke: var(--neon-cyan);
    stroke-width: 1.5px;
}

.vote-btn.up:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.2);
}

.vote-btn.up:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 2px var(--neon-cyan)) drop-shadow(0 0 8px var(--neon-cyan));
}

.vote-btn.up:hover path {
    fill: rgba(0, 229, 255, 0.3);
}

.vote-btn:active {
    transform: scale(0.9) translateY(0);
}

.lang-switcher button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: clamp(0.72rem, 1.3vw, 0.95rem);
    font-family: 'Comfortaa';
    opacity: 0.6;
    padding: 0;
}


.lang-switcher button.active {
    opacity: 1;
    color: #39ff14;
}

.close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #bd00ff;
    color: #bd00ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.close-icon:hover {
    transform: rotate(90deg);
    background: #bd00ff;
    color: #fff;
    box-shadow: 0 0 15px #bd00ff;
}

.type-selector .radio-custom {
    padding: clamp(7px, 1.2vw, 10px) clamp(12px, 2.6vw, 20px);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #555;
    color: #888;
    font-family: 'Russo One';
    transition: 0.3s;
    font-size: clamp(0.78rem, 1.6vw, 1rem);
    line-height: 1;
}


.radio-label input:checked+.radio-custom.human {
    background: rgba(255, 94, 0, 0.2);
    color: var(--neon-orange);
    border-color: var(--neon-orange);
}

.radio-label input:checked+.radio-custom.robot {
    background: rgba(0, 229, 255, 0.2);
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

footer {
    text-align: center;
    margin-top: 50px;

    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
    color: #555;
    font-size: 0.8rem;
}

.sort-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 18px auto;
    width: 100%;
    max-width: 900px;
}

.sort-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 0;
    line-height: 0;
    color: transparent;
    position: relative;
    overflow: hidden;
}

.sort-label::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    background:
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) 0px 1px / 18px 2px no-repeat,
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) 3px 7px / 12px 2px no-repeat,
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) 6px 13px / 6px 2px no-repeat;
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.35));
    border-radius: 4px;
}


@media (max-width: 415px) {
    .sort-label {
        width: 22px;
        height: 22px;
    }

    .sort-label::before {
        width: 16px;
        height: 16px;
        background:
            linear-gradient(var(--neon-cyan), var(--neon-cyan)) 0px 1px / 16px 2px no-repeat,
            linear-gradient(var(--neon-cyan), var(--neon-cyan)) 2.5px 6px / 11px 2px no-repeat,
            linear-gradient(var(--neon-cyan), var(--neon-cyan)) 5px 11px / 6px 2px no-repeat;

    }
}


.type-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.radio-label {
    display: inline-flex;
    align-items: center;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-selector .radio-custom {
    cursor: pointer;
}

@media (max-width: 415px) {
    .sort-row {
        gap: 8px;
        margin-bottom: 12px;
    }

    .sort-label {
        font-size: 0.8rem;
    }

    .type-selector {
        gap: 6px;
    }
}