:root {
    --bg-clr: rgb(0, 0, 0);
    --fg-clr: rgb(0, 0, 0);
    --accent-clr: rgb(78, 46, 121);
    --text-clr: white;
    --hidden-text-clr: rgb(170, 170, 170);
    --border-radius: 0.45rem;
    --backdrop-url: url("");
    
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: grid;
    align-items: center;
    justify-content: center;
    background: var(--bg-clr);
    color: var(--text-clr);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#avatar {
    border-radius: 50%;
}

.display {
    min-width: 35vw;
    padding: 1.75em;
    background: #000;
    border: 3px solid #fff;
    border-radius: 30px;
    border-color: #fff;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.userinfo {
    background-image:
        linear-gradient(
            rgb(0, 0, 0, 0.7),
            rgb(0, 0, 0, 0.7)
        ),
        var(--backdrop-url);
    background-size: cover;
    background-position: 50% 50%;
    border-radius: var(--border-radius);
    padding: 1em 1em;
    display: grid;
    grid-template-columns: min-content 1fr min-content;
    gap: 0 12px;
    align-items: center;
    grid-template-areas:
        "avatar display buttons"
        "avatar username buttons"
        "avatar status buttons";
    transition: all 0.3s ease;
}

/* Группа кнопок - вертикальное расположение */
.button-group {
    grid-area: buttons;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

#avatar { grid-area: avatar; }

/* Неоновое свечение для display имени - БЕЛЫЙ цвет */
#display {
    grid-area: display;
    font-family: 'Montserrat', sans-serif;
    font-size: larger;
    font-weight: bold;
    margin-top: 25px;
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(13, 6, 26, 0.5),
                 0 0 10px rgba(5, 2, 10, 0.3),
                 0 0 15px rgba(0, 0, 0, 0.2);
    transition: text-shadow 0.3s ease;
}

#display:hover {
    text-shadow: 0 0 10px rgba(7, 3, 14, 0.8),
                 0 0 20px rgba(9, 4, 17, 0.5),
                 0 0 30px rgba(0, 0, 0, 0.3);
}

/* Username - БЕЛЫЙ цвет */
#username {
    color: #ffffff !important;
    grid-area: username;
    font-family: 'Montserrat', sans-serif;
    font-size: medium;
    margin-bottom: 15px;
    text-shadow: 0 0 3px rgba(124, 58, 237, 0.3),
                 0 0 8px rgba(124, 58, 237, 0.2);
    transition: text-shadow 0.3s ease;
}

#username:hover {
    text-shadow: 0 0 8px rgba(124, 58, 237, 0.6),
                 0 0 15px rgba(124, 58, 237, 0.4);
}

/* Status текст - БЕЛЫЙ цвет */
#status {
    display: flex;
    align-items: center;
    gap: 6px;
    grid-area: status;
    font-family: 'Montserrat', sans-serif;
    font-size: large;
    font-weight: bold;
    color: #ffffff !important;
}

#status-text {
    color: #ffffff !important;
}

#viewuser, #viewgithub {
    cursor: pointer;
    display: inline-block;
    z-index: 100;
    position: relative;
}

.button1, .button2 {
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    pointer-events: auto;
    text-align: center;
}

.button1:hover, .button2:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.button1 img, .button2 img {
    display: block;
    margin: 0 auto;
}

/* Активности - плавный подъем при наведении */
.activity {
    display: grid;
    grid-template-columns: min-content 1fr;
    grid-template-rows: min-content min-content min-content;
    gap: 0px 12px;
    align-items: center;
    grid-template-areas: 
        "images name"
        "images details"
        "images state";
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--border-radius);
    padding: 12px;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
}

.activity:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.act-name {
    font-weight: 700;
    grid-area: name;
}
.act-details { grid-area: details; }
.act-state { grid-area: state; }
.act-images {
    position: relative;
    grid-area: images;
}
.largeimage { border-radius: var(--border-radius); }
.smallimage {
    position: absolute;
    bottom: -5px;
    right: -5px;
    border-radius: 50%;
    border: 1px solid var(--fg-clr);
}
.activities { display: grid; gap: 16px 0; }
.return {
    position: absolute;
    top: 8px;
    left: 8px;
}
a { text-decoration: none; }

.wrapper {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: #000;
    clip-path: circle(25px at calc(100% - 45px) 45px);
    transition: all 0.3s ease-in-out;
    z-index: 10;
}
#active:checked ~ .wrapper { clip-path: circle(75%); }
.menu-btn {
    position: absolute;
    z-index: 2;
    right: 20px;
    top: 20px;
    height: 50px;
    width: 50px;
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    background: #000;
    transition: all 0.3s ease-in-out;
}
#active:checked ~ .menu-btn { color: #fff; }
#active:checked ~ .menu-btn i:before { content: "\f00d"; }
.wrapper ul {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    list-style: none;
    text-align: center;
}
.wrapper ul li { margin: 15px 0; }
.wrapper ul li a {
    color: none;
    text-decoration: none;
    font-size: 30px;
    font-weight: 500;
    padding: 5px 30px;
    color: #fff;
    border-radius: 50px;
    background: #000;
    position: relative;
    line-height: 50px;
    transition: all 0.3s ease;
}
.wrapper ul li a:after {
    position: absolute;
    content: "";
    background: #fff;
    background: linear-gradient(#14ffe9, #ffeb3b, #ff00e0);
    width: 104%;
    height: 110%;
    left: -2%;
    top: -5%;
    border-radius: 50px;
    transform: scaleY(0);
    z-index: -1;
    animation: rotate 1.5s linear infinite;
    transition: transform 0.3s ease;
}
.wrapper ul li a:hover:after { transform: scaleY(1); }
.wrapper ul li a:hover { color: #fff; }
input[type="checkbox"] { display: none; }
.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    text-align: center;
    width: 100%;
    color: #202020;
}
.content .title {
    font-size: 40px;
    font-weight: 700;
}
.content p {
    font-size: 35px;
    font-weight: 600;
}
@keyframes rotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

footer {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    z-index: 100;
    pointer-events: auto;
}
footer a {
    color: rgb(78, 46, 121);
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
}
footer a:hover {
    color: rgb(78, 46, 121);
    text-decoration: underline;
}

/* ========== PRELOADER STYLES ========== */
#preloader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a0a 100%) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    transition: opacity 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), visibility 0.8s ease !important;
    transform: translate(0, 0) !important;
    pointer-events: auto !important;
}

#preloader.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#matrixCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    z-index: 2;
    position: relative;
    pointer-events: none;
}

.cube-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    perspective: 800px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3d 3s infinite linear;
}

.cube-face {
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
    opacity: 0.9;
}

.front  { transform: rotateY(0deg) translateZ(60px); }
.back   { transform: rotateY(180deg) translateZ(60px); }
.right  { transform: rotateY(90deg) translateZ(60px); }
.left   { transform: rotateY(-90deg) translateZ(60px); }
.top    { transform: rotateX(90deg) translateZ(60px); }
.bottom { transform: rotateX(-90deg) translateZ(60px); }

@keyframes rotate3d {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.percentage {
    font-family: 'Lato', monospace;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7c3aed, #a78bfa, #7c3aed);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient 2s linear infinite;
    margin-bottom: 10px;
}

@keyframes gradient {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.progress-bar-container {
    width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 20px auto;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa, #7c3aed);
    background-size: 200% auto;
    border-radius: 4px;
    animation: progress 3.25s ease-out forwards, gradient 1.5s linear infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 45%; }
    100% { width: 100%; }
}

.scrolling-text {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-family: 'Lato', monospace;
    font-size: 14px;
    color: rgba(124, 58, 237, 0.6);
    pointer-events: none;
}

.scrolling-text span {
    display: inline-block;
    animation: scroll 8s linear infinite;
    padding-left: 100%;
}

@keyframes scroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

.glitch {
    font-size: 1.2rem;
    color: rgba(124, 58, 237, 0.8);
    font-family: monospace;
    letter-spacing: 2px;
    animation: glitch 1s infinite;
    margin-top: 20px;
}

@keyframes glitch {
    0%, 100% { opacity: 1; text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff; }
    25% { opacity: 0.8; text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff; }
    50% { opacity: 1; text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff; }
    75% { opacity: 0.8; text-shadow: -2px 0 #00ffff, 2px 0 #ff00ff; }
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #7c3aed;
    border-radius: 50%;
    opacity: 0;
    animation: float 4s infinite;
    pointer-events: none;
}

@keyframes float {
    0% {
        opacity: 0;
        transform: translateY(0px) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-100px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translateY(-200px) scale(0);
    }
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: var(--fg-clr) !important;
    border: 2px solid var(--accent-clr) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    z-index: 10000 !important;
    font-size: 24px !important;
    backdrop-filter: blur(5px) !important;
    pointer-events: auto !important;
}

.theme-toggle:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 0 15px var(--accent-clr) !important;
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    transition: all 0.3s ease;
    pointer-events: none;
}

.theme-toggle .moon-icon {
    display: none;
}

/* Light Theme */
body.light-theme {
    --bg-clr: rgb(240, 240, 245);
    --fg-clr: rgb(255, 255, 255);
    --accent-clr: rgb(100, 80, 200);
    --text-clr: rgb(30, 30, 40);
    --hidden-text-clr: rgb(100, 100, 120);
}

body.light-theme .display {
    background: #f0f0f0;
    border-color: #ccc;
}

/* Сохраняем белый цвет текста при светлой теме */
body.light-theme #display,
body.light-theme #username,
body.light-theme #status,
body.light-theme #status-text {
    color: #ffffff !important;
}

/* Для светлой темы меняем свечение на синее, но цвет остается белым */
body.light-theme #display {
    text-shadow: 0 0 5px rgba(0, 102, 204, 0.5),
                 0 0 10px rgba(0, 102, 204, 0.3);
}

body.light-theme #display:hover {
    text-shadow: 0 0 10px rgba(0, 102, 204, 0.8),
                 0 0 20px rgba(0, 102, 204, 0.5);
}

body.light-theme #username {
    text-shadow: 0 0 3px rgba(0, 102, 204, 0.3),
                 0 0 8px rgba(0, 102, 204, 0.2);
}

body.light-theme #username:hover {
    text-shadow: 0 0 8px rgba(0, 102, 204, 0.6),
                 0 0 15px rgba(0, 102, 204, 0.4);
}

body.light-theme .activity {
    background: rgba(255, 255, 255, 0.8);
}

body.light-theme .activity:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.light-theme #preloader {
    background: radial-gradient(circle at center, #e0e0e0 0%, #f5f5f5 100%) !important;
}

body.light-theme .cube-face {
    background: linear-gradient(135deg, #0066cc, #004499);
}

body.light-theme .percentage {
    background: linear-gradient(135deg, #0066cc, #004499, #0066cc);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-theme .progress-bar {
    background: linear-gradient(90deg, #0066cc, #004499, #0066cc);
}

body.light-theme .glitch {
    color: rgba(0, 102, 204, 0.8);
}

body.light-theme .scrolling-text {
    color: rgba(0, 102, 204, 0.6);
}

#main-content {
    display: none;
}

#viewuser, #viewgithub, .button1, .button2, footer a, .theme-toggle {
    position: relative;
    z-index: 10000;
    cursor: pointer;
}