@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0d1117;
    --glass-bg: rgba(22, 28, 54, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-accent: #5eead4;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --font-family: 'Inter', sans-serif;
    --icon-color: var(--text-primary);
}

html.light-theme {
    --bg-color: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-accent: #0d9488;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --icon-color: var(--text-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
}

body.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(315deg, rgba(94, 234, 212, 0.05), var(--bg-color), rgba(94, 234, 212, 0.1));
    background-size: 200% 200%;
    animation: gradient-animation 20s ease infinite;
    transition: opacity 0.4s ease;
}

html.light-theme body::before {
    background: linear-gradient(315deg, rgba(13, 148, 136, 0.05), var(--bg-color), rgba(13, 148, 136, 0.1));
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 5vh 2vw;
}

.profile-card,
.section {
    padding: 3rem;
    margin-bottom: 2.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 16px 48px var(--shadow-color);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.profile-card {
    text-align: center;
}

.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: -0.5rem auto 2.5rem;
    transition: background 0.4s ease;
}

.section-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-accent);
}

.section p {
    font-size: 1.1em;
    color: var(--text-secondary);
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid var(--glass-border);
    object-fit: cover;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    z-index: 10;
    position: relative;
}

.hover-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--glass-border);
    object-fit: cover;
    position: absolute;
    top: 50%;
    opacity: 0;
    transform: translateY(-50%) scale(0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
    cursor: pointer;
}

.hover-avatar.left {
    left: 0;
}

.hover-avatar.right {
    right: 0;
}

.avatar-container:hover .hover-avatar.left,
.avatar-container.avatars-visible .hover-avatar.left {
    opacity: 1;
    transform: translateY(-50%) translateX(-100%) scale(1) rotate(-15deg);
}

.avatar-container:hover .hover-avatar.right,
.avatar-container.avatars-visible .hover-avatar.right {
    opacity: 1;
    transform: translateY(-50%) translateX(100%) scale(1) rotate(15deg);
}

.avatar-container:hover .hover-avatar.left:hover {
    transform: translateY(-50%) translateX(-110%) scale(1.15) rotate(-15deg);
    box-shadow: 0 0 20px var(--text-accent);
}

.avatar-container:hover .hover-avatar.right:hover {
    transform: translateY(-50%) translateX(110%) scale(1.15) rotate(15deg);
    box-shadow: 0 0 20px var(--text-accent);
}

.avatar-container:hover .profile-avatar {
    transform: scale(0.9) rotate(3deg);
    box-shadow: 0 0 30px var(--text-accent);
}

.profile-name {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #a78bfa, var(--text-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(94, 234, 212, 0.3);
    transition: opacity 0.5s ease-in-out;
}

html.light-theme .profile-name {
    background: linear-gradient(90deg, #7c3aed, var(--text-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.profile-name.fade-out {
    opacity: 0;
}

.profile-title {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 400;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a,
.social-links .clickable-icon {
    color: var(--text-primary);
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.social-links a:hover,
.social-links .clickable-icon:hover {
    color: var(--text-accent);
    transform: translateY(-5px);
}

.social-links svg,
.social-links .svg-icon {
    width: 30px;
    height: 30px;
}

.svg-icon,
.toast-icon {
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    display: inline-block;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 30px;
}

.project-card {
    background: rgba(30, 41, 59, 0.3);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

html.light-theme .project-card {
    background: rgba(226, 232, 240, 0.4);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--text-accent);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.project-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.project-card p {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.interests-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.interest-tag {
    display: inline-block;
    background: rgba(30, 41, 59, 0.4);
    color: var(--text-secondary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

html.light-theme .interest-tag {
    background: rgba(226, 232, 240, 0.5);
}

.interest-tag:hover {
    background-color: var(--text-accent);
    color: var(--bg-color);
    transform: translateY(-3px);
    border-color: var(--text-accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

html.light-theme .btn {
    background: rgba(226, 232, 240, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background: rgba(51, 65, 85, 0.7);
    border-color: var(--text-accent);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

html.light-theme .btn:hover {
    color: var(--text-primary);
}

.btn-primary {
    background: rgba(45, 212, 191, 0.2);
    border-color: rgba(45, 212, 191, 0.7);
    color: white;
}

html.light-theme .btn-primary {
    background: rgba(13, 148, 136, 0.2);
    border-color: rgba(13, 148, 136, 0.7);
    color: #0f172a;
}

.btn-primary:hover {
    background: rgba(45, 212, 191, 0.3);
    border-color: var(--text-accent);
    box-shadow: 0 0 25px rgba(45, 212, 191, 0.5);
}

html.light-theme .btn-primary:hover {
    background: rgba(13, 148, 136, 0.3);
    box-shadow: 0 0 25px rgba(13, 148, 136, 0.5);
}

.accept-button {
    border: none;
    font-family: var(--font-family);
}

.toast {
    position: fixed;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px var(--shadow-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.toast.visible {
    opacity: 1;
    pointer-events: auto;
}

#update-toast.visible {
    transform: translateY(0);
}

#save-notification-toast.visible {
    transform: translateX(-50%) translateY(0);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: var(--text-accent);
}

#update-toast {
    bottom: 25px;
    right: 25px;
    width: 350px;
    max-width: 90vw;
    padding: 1.25rem;
    cursor: pointer;
    transform: translateY(100%);
}

#update-toast p {
    color: var(--text-primary);
    font-weight: 500;
}

#update-toast.visible .toast-progress {
    transition: width 7s linear;
    width: 0;
}

#save-notification-toast {
    bottom: 25px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem 1.5rem;
    transform: translateX(-50%) translateY(150%);
}

#save-notification-toast .toast-icon {
    width: 28px;
    height: 28px;
    color: var(--text-accent);
    flex-shrink: 0;
}

#save-notification-toast p {
    color: var(--text-primary);
    font-weight: 500;
}

#save-notification-toast .toast-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    margin-left: 10px;
    transition: color 0.3s ease;
}

#save-notification-toast .toast-close-btn:hover {
    color: var(--text-primary);
}

#save-notification-toast.visible .toast-progress {
    transition: width 4s linear;
    width: 0;
}

#achievement-toast {
    top: 20px;
    left: 20px;
    padding: 0;
    background: none;
    border: none;
    backdrop-filter: none;
    box-shadow: none;
    border-radius: 8px;
    transform: translateX(-110%);
}

#achievement-toast.visible {
    visibility: visible;
    animation: minecraft-achievement 5s ease-in-out forwards;
}

#achievement-toast img {
    display: block;
    width: 320px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px var(--shadow-color);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.popup-overlay.hidden {
    animation: fadeOut 0.5s forwards;
    pointer-events: none;
}

.popup-content {
    position: relative;
    padding: 30px;
    max-width: 90%;
    width: 500px;
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 16px 48px var(--shadow-color);
}

.popup-content h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--text-accent);
}

.popup-content p {
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.popup-content a {
    color: var(--text-accent);
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

html.light-theme .modal-overlay {
    background: rgba(255, 255, 255, 0.2);
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    position: relative;
    padding: 2rem;
    width: 550px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 16px 48px var(--shadow-color);
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--text-accent) transparent;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    font-size: 1.5em;
    color: var(--text-accent);
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-content ul {
    list-style: none;
}

.modal-content ul li {
    font-size: 1.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5em;
    position: relative;
}

.modal-content ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--text-accent);
    font-weight: bold;
}

.modal-close-btn {
    position: sticky;
    top: 15px;
    margin-left: auto;
    margin-right: 20px;
    z-index: 10;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.modal-close-btn:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: var(--text-accent);
    border-radius: 20px;
    border: 2px solid var(--bg-color);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background-color: #7efce9;
}

html.light-theme .modal-content::-webkit-scrollbar-thumb:hover {
    background-color: #0a7d73;
}

.settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.settings-btn:hover {
    transform: rotate(45deg);
    border-color: var(--text-accent);
}

.settings-btn {
    color: var(--icon-color);
}

.settings-btn:hover {
    color: var(--text-accent);
}

.settings-btn svg,
.settings-btn .svg-icon {
    width: 24px;
    height: 24px;
}

#changelog-btn {
    top: 80px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.3s ease;
}

#changelog-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

#changelog-btn svg,
#changelog-btn .svg-icon {
    fill: var(--icon-color);
    transition: transform 0.3s ease;
}

#changelog-btn:hover svg,
#changelog-btn:hover .svg-icon {
    transform: scale(1.1) rotate(-15deg);
}

.setting-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-label-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-label-group label {
    color: var(--text-primary);
    font-size: 1.1em;
}

.info-btn {
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-btn:hover {
    background: var(--text-accent);
    color: var(--bg-color);
    border-color: var(--text-accent);
}

.setting-description {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    padding: 0 15px;
    color: var(--text-secondary);
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.1);
    border-left: 3px solid var(--glass-border);
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease, padding 0.4s ease;
}

html.light-theme .setting-description {
    background: rgba(255, 255, 255, 0.4);
}

.setting-description.visible {
    max-height: 200px;
    opacity: 1;
    margin-top: 15px;
    padding: 10px 15px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(30, 41, 59, 0.4);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--glass-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 3px;
    background-color: var(--text-primary);
    transition: .4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--text-accent);
}

input:checked+.slider:before {
    transform: translateX(26px);
    background-color: white;
}

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9em;
    color: rgba(148, 163, 184, 0.5);
}

html.light-theme .footer {
    color: rgba(71, 85, 105, 0.5);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@keyframes minecraft-achievement {
    0% {
        opacity: 0;
        transform: translateX(-110%);
    }

    10% {
        opacity: 1;
        transform: translateX(0);
    }

    90% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-110%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 5vh 3vw;
    }

    .profile-card,
    .section {
        padding: 1.5rem;
    }

    .profile-name {
        font-size: 2.2rem;
    }

    .profile-title {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8em;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .avatar-container:hover .hover-avatar.left,
    .avatar-container.avatars-visible .hover-avatar.left {
        transform: translateY(-50%) translateX(-85%) scale(1) rotate(-15deg);
    }

    .avatar-container:hover .hover-avatar.right,
    .avatar-container.avatars-visible .hover-avatar.right {
        transform: translateY(-50%) translateX(85%) scale(1) rotate(15deg);
    }

    #update-toast {
        bottom: auto;
        right: auto;
        top: 20px;
        left: 50%;
        transform: translate(-50%, -150%);
    }

    #update-toast.visible {
        transform: translate(-50%, 0);
    }

    .settings-btn {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    #changelog-btn {
        top: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95vw;
        max-height: 85vh;
    }

    .modal-close-btn {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
        top: 10px;
        margin-right: 0;
    }

    .setting-item-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .theme-switch {
        align-self: flex-end;
    }
}

@media (hover: none) and (pointer: coarse) {
    .profile-avatar {
        cursor: pointer;
    }
}

#easter-egg-trigger {
    font-family: "Tiny5", sans-serif !important;
    font-size: 1.2rem !important;
    text-transform: uppercase;
    background-color: #000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: none !important;
    padding: 8px 16px !important;
    cursor: pointer;
    display: inline-block;
}

#easter-egg-trigger:hover {
    color: #ff0 !important;
    background-color: #000 !important;
    transform: none !important;
}