:root {
    --bg-color: #3e4a7c;
    --secbg-color: #4b699e;
    --main-bg-color: rgba(255, 255, 255, 0.05);
    --secondary-bg-color: rgba(255, 255, 255, 0.2);
    --accent-color: #9fc5f8;
    --text-color: #ffffff;
    --blur-bg: blur(6px);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(0, 0, 0, 0.25);
}

body {
    font-family: "Nunito", sans-serif;
    font-weight: 500;
    font-style: normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(var(--angle), var(--bg-color), var(--secbg-color), var(--accent-color));
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    animation: fadeIn 2s forwards, rotate 10s linear infinite;
    background-attachment: fixed;
    background-size: cover;
}

#video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.content-container {
    backdrop-filter: blur(50px);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    z-index: 1;
    transition: all 0.3s ease;
}

h1, h3, h5, h2 {
    color: var(--text-color);
    margin: 5px 0;
    opacity: 0;
    animation: fadeIn 2s forwards;
}

h1 {
    font-size: 2.5em;
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: flex;
    gap: 20px;
    opacity: 0;
    animation: fadeIn 2s forwards 0.5s;
}

.social-links a {
    background-color: var(--main-bg-color);
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1em;
    padding: 10px 16px;
    border: 2px solid var(--secondary-bg-color);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 160px; /* фиксированный размер */
    height: 42px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Текст — по центру */
.social-links .link-text {
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

/* Иконка — абсолютный центр */
.social-links .link-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* При наведении — текст исчезает, иконка появляется */
.social-links a:hover .link-text {
    opacity: 0;
    transform: scale(0.6);
}

.social-links a:hover .link-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.social-links .link-icon {
    backface-visibility: hidden;
}

.social-links a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, transparent, var(--accent-color), transparent);
    transition: all 0.5s ease-in-out;
    opacity: 0.2;
}

.social-links a:hover::before {
    left: 100%;
    opacity: 0.4;
}

.social-links a:hover {
    color: #000;
    background-color: var(--accent-color);
    border-color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/*.social-links a {*/
/*    background-color: var(--main-bg-color);*/
/*    text-decoration: none;*/
/*    color: var(--text-color);*/
/*    font-size: 1.2em;*/
/*    padding: 8px 12px;*/
/*    border: 2px solid var(--secondary-bg-color);*/
/*    border-radius: 5px;*/
/*    transition: all 0.3s ease;*/
/*}*/

/*.social-links a:hover {*/
/*    background-color: var(--accent-color);*/
/*    color: white;*/
/*    border-color: var(--text-color);*/
/*    transform: scale(1.05);*/
/*    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);*/
/*}*/

.move-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.5em;
    display: none;
    animation: fadeIn 2s forwards;
}

.projects-container {
    display: none;
    backdrop-filter: blur(30px);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    max-width: 600px;
    width: 90%;
}

.project-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: block;
    margin-bottom: 15px;
}

.project-item:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.15);
}

.project-description {
    display: block;
    font-size: 0.8em;
    color: #ececec;
    margin-top: 5px;
}

#projects-button.active {
    background-color: #6d8ec9;
    border-color: #ececec;
}

.back-button {
    background-color: var(--main-bg-color);
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1em;
    padding: 10px 16px;
    border: 2px solid var(--secondary-bg-color);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 160px; /* фиксированный размер */
    height: 42px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: #000;
    background-color: var(--accent-color);
    border-color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/*.extras-container {*/
/*    margin-top: 30px;*/
/*    padding: 20px;*/
/*    backdrop-filter: blur(30px);*/
/*    background-color: rgba(255, 255, 255, 0.05);*/
/*    border: 2px solid var(--glass-border);*/
/*    border-radius: 12px;*/
/*    text-align: center;*/
/*    color: var(--text-color);*/
/*    animation: fadeIn 2s ease-in-out;*/
/*}*/

/*#toggle-extras {*/
/*    background-color: var(--accent-color);*/
/*    color: #000;*/
/*    border: none;*/
/*    padding: 10px 20px;*/
/*    border-radius: 8px;*/
/*    cursor: pointer;*/
/*    margin-bottom: 15px;*/
/*    font-weight: bold;*/
/*    transition: all 0.3s ease;*/
/*}*/

/*#toggle-extras:hover {*/
/*    transform: scale(1.05);*/
/*    background-color: #fff;*/
/*}*/

/*.timer-container {*/
/*    font-size: 1.2em;*/
/*    background: linear-gradient(135deg, #ff6a00, #ee0979);*/
/*    padding: 10px;*/
/*    border-radius: 10px;*/
/*    margin-top: 15px;*/
/*    color: white;*/
/*    font-weight: bold;*/
/*    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);*/
/*}*/
#c-hints {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 14px;
    opacity: 0.6;
    background: #222;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    z-index: 999;
    pointer-events: none;
}

.terminal-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: rgba(10, 10, 10, 0.9);
    color: #00ffcc;
    font-family: monospace;
    font-size: 14px;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(10px);
}

#terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: #00ffcc;
    font-family: monospace;
    font-size: 14px;
    width: 100%;
}

.terminal-output {
    overflow-y: auto;
    flex-grow: 1;
    white-space: pre-wrap;
    line-height: 1.3em;
}

.terminal-line {
    margin-bottom: 4px;
}

.terminal-line .user-host {
    color: #00dfff;
    font-weight: bold;
}

.terminal-line .command {
    color: #ffd700;
    font-style: italic;
}
.terminal-banner {
    font-family: monospace;
    white-space: pre;
    font-size: 14px;
    color: #00ff00;
    margin: 0;
    padding: 10px;
}



#terminal-output {
    /*max-height: 400px; !* ограничим высоту, чтобы скролл появился *!*/
    overflow-y: auto; /* вертикальный скролл */
    padding-right: 8px; /* чтобы скроллбар не наслаивался на контент */
}

/* для WebKit браузеров (Chrome, Safari, Edge Chromium) */
#terminal-output::-webkit-scrollbar {
    width: 10px; /* ширина полосы прокрутки */
}

#terminal-output::-webkit-scrollbar-track {
    background: #1a1a1a; /* фон дорожки */
    border-radius: 5px;
}

#terminal-output::-webkit-scrollbar-thumb {
    background-color: #00ff88; /* цвет ползунка */
    border-radius: 5px;
    border: 2px solid #1a1a1a; /* отступы вокруг ползунка для "воздуха" */
}

/* Firefox */
#terminal-output {
    scrollbar-width: thin;
    scrollbar-color: #00ff88 #1a1a1a;
}

#turnstile-container {
    display: none;
    margin-top: 1em;
    padding: 10px;
    background-color: rgba(15, 15, 15, 0.9);
    border: 1px solid #333;
    border-radius: 6px;
    width: fit-content;
    font-family: monospace;
    color: #0f0;
    text-align: center;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}


#no-js-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1.5rem;
    margin: 0;
    background-color: #ff4444;
    color: white;
    font-family: 'Nunito', sans-serif;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-out;
}

#no-js-notification a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
    transition: opacity 0.2s;
}

#no-js-notification a:hover {
    opacity: 0.8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@media (max-width: 768px) {
    #console-hint {
        display: none;
    }

    .social-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0;
        max-width: 400px;
        margin: 0 auto;
    }

    .social-links li {
        list-style: none;
        width: 100%;
    }

    .social-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 9px 9px;
        font-size: 1em;
        border-radius: 8px;
        background-color: var(--main-bg-color);
        color: var(--text-color);
        text-decoration: none;
        border: 2px solid var(--secondary-bg-color);
        transition: background-color 0.3s ease;
    }

    .content-container {
        padding: 9px 9px;
    }

    .social-links a:hover {
        background-color: var(--accent-color);
    }

    .social-links svg {
        width: 18px;
        height: 18px;
    }
}


@media (min-width: 769px) {
    .move-icon {
        display: block;
    }
}