:root {
    --bg: #0f1012;
    --surface: #16171a;
    --shadow-light: rgba(255, 255, 255, 0.03);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --accent: #00ff9d;
    /* Hacker Green / Security Green */
    --accent-dim: rgba(0, 255, 157, 0.1);
    --text-main: #e0e0e0;
    --text-dim: #70757a;
    --font-mono: 'JetBrains Mono', 'Roboto Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: var(--font-mono);
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Grid Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--shadow-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--shadow-light) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Neumorphic Containers */
.neu-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow:
        5px 5px 15px var(--shadow-dark),
        -5px -5px 15px var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 2rem;
    transition: all 0.3s ease;
}

.neu-inset {
    background: var(--bg);
    box-shadow: inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    border-radius: 8px;
    padding: 1rem;
}

/* Header / Terminal Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 2px solid var(--accent-dim);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

/* Main Content */
main {
    padding-top: 100px;
    max-width: 1400px;
    margin: 0 auto;
    padding-inline: 5%;
}

/* Terminal Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    min-height: 80vh;
    align-items: center;
    padding-block: 4rem;
}

.terminal-window {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
}

.terminal-header {
    background: #1a1a1a;
    padding: 8px 15px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-body {
    padding: 20px;
    font-size: 0.9rem;
    color: var(--accent);
    min-height: 300px;
}

.typing::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.main-logo {
    width: 250px;
    height: 250px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.05));
    border-radius: 40px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 0.9;
}

.hero-title span {
    color: var(--accent);
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
}

.typewriter-subtitle {
    color: var(--text-dim);
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    overflow: hidden;
    white-space: nowrap;
    min-height: 1.5em;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    animation: cursorBlink 0.7s infinite;
    vertical-align: middle;
}

@keyframes cursorBlink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Grid Layouts */
.section-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::before {
    content: '>';
    color: var(--accent);
    margin-right: 10px;
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
        text-shadow: none;
    }

    20% {
        transform: translate(-2px, 2px);
        text-shadow: 2px 0 var(--accent), -2px 0 #ff00ff;
    }

    40% {
        transform: translate(-2px, -2px);
        text-shadow: -2px 0 var(--accent), 2px 0 #ff00ff;
    }

    60% {
        transform: translate(2px, 2px);
        text-shadow: 2px 0 #ff00ff, -2px 0 var(--accent);
    }

    80% {
        transform: translate(2px, -2px);
        text-shadow: -2px 0 #ff00ff, 2px 0 var(--accent);
    }

    100% {
        transform: translate(0);
        text-shadow: none;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.col-4 {
    grid-column: span 4;
}

.col-8 {
    grid-column: span 8;
}

.col-12 {
    grid-column: span 12;
}

/* Status Indicators */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid var(--accent);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 var(--accent-dim);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px transparent;
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 transparent;
    }
}

/* Projects & Blog */
.project-item {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-item:last-child {
    border: none;
}

.tech-tag {
    font-size: 0.7rem;
    color: var(--text-dim);
    border: 1px solid var(--text-dim);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 5px;
}

/* Buttons */
.btn-cmd {
    background: var(--surface);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 20px;
    font-family: inherit;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    font-weight: 600;
}

.btn-cmd:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent);
}

/* Mobile & Tablet Optimizations */

/* Burger Menu Button */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.burger-menu span {
    width: 25px;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation Overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 16, 18, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 1rem 2rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.mobile-lang-switch {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Tablet - 1024px */
@media (max-width: 1024px) {
    .dashboard-grid {
        gap: 1rem;
    }

    .col-8,
    .col-4 {
        grid-column: span 12;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 60px;
    }

    .profile-container {
        align-items: center;
        text-align: center;
        order: -1;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .main-logo {
        width: 150px;
        height: 150px;
    }

    .terminal-window {
        margin: 0 auto;
    }
}

/* Mobile - 768px */
@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .nav-links,
    .lang-switch {
        display: none !important;
    }

    .mobile-nav {
        display: flex;
    }

    .header {
        padding: 1rem 5%;
    }

    main {
        padding-top: 80px;
        padding-inline: 4%;
    }

    .hero {
        min-height: auto;
        padding-block: 2rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .terminal-body {
        font-size: 0.8rem;
        padding: 15px;
        min-height: 200px;
    }

    .section-title {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .project-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .project-item .btn-cmd {
        width: 100%;
        text-align: center;
    }

    .neu-card {
        padding: 1.5rem;
        border-radius: 8px;
    }

    .dashboard-grid {
        gap: 1rem;
        margin-bottom: 3rem;
    }

    footer {
        padding: 2rem !important;
    }
}

/* Small Mobile - 480px */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .main-logo {
        width: 120px;
        height: 120px;
    }

    .profile-container>div {
        flex-direction: column;
        width: 100%;
    }

    .profile-container .btn-cmd {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 1rem;
    }

    .neu-card {
        padding: 1rem;
    }

    .terminal-body {
        font-size: 0.75rem;
        min-height: 180px;
    }

    .status-pill {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .mobile-nav a {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
    }

    /* Form adjustments */
    #contact-form input,
    #contact-form textarea {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .btn-cmd {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
}

/* Enhanced Blog & Project Cards */
.project-item {
    transition: transform 0.2s;
    cursor: default;
}

@media (hover: hover) {
    .project-item:hover {
        transform: scale(1.01);
        background: rgba(0, 255, 157, 0.05);
    }
}

/* Language Toggling */
.lang-node {
    display: none;
}

.lang-node.active {
    display: block;
}

span.lang-node.active {
    display: inline;
}

/* Touch-friendly improvements */
@media (pointer: coarse) {
    .btn-cmd {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-links a,
    .mobile-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-ascii {
    color: var(--accent);
    font-size: 0.6rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px var(--accent);
}

.loading-bar {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.loading-status {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

/* Interactive Terminal */
.terminal-output {
    max-height: 200px;
    overflow-y: auto;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    border-top: 1px solid var(--accent-dim);
    padding-top: 10px;
}

.terminal-input-line .prompt {
    color: var(--accent);
    font-weight: bold;
}

.terminal-input-line input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    caret-color: var(--accent);
}

.terminal-input-line input::placeholder {
    color: var(--text-dim);
    opacity: 0.5;
}

/* Хакер-котик */
.hacker-cat {
    position: relative;
    width: 100px;
    height: 90px;
    margin-bottom: -20px;
    z-index: 10;
    animation: catBounce 2s ease-in-out infinite;
}

@keyframes catBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Ушки */
.cat-ear {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid #2a2a2a;
    top: 0;
}

.cat-ear.left {
    left: 15px;
    transform: rotate(-15deg);
}

.cat-ear.right {
    right: 15px;
    transform: rotate(15deg);
}

.cat-ear::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid #ff9db5;
    top: 8px;
    left: -6px;
}

/* Голова */
.cat-head {
    position: absolute;
    width: 70px;
    height: 55px;
    background: #2a2a2a;
    border-radius: 50% 50% 45% 45%;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
}

/* Очки */
.cat-glasses {
    position: absolute;
    display: flex;
    align-items: center;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.glass-frame {
    width: 22px;
    height: 18px;
    background: rgba(0, 255, 157, 0.1);
    border: 2px solid var(--accent);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.glass-bridge {
    width: 8px;
    height: 2px;
    background: var(--accent);
}

.cat-eye {
    width: 14px;
    height: 14px;
    background: #1a1a1a;
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cat-pupil {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    transition: transform 0.1s ease-out;
    box-shadow: 0 0 5px var(--accent);
}

.cat-pupil::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    top: 1px;
    left: 1px;
}

/* Нос */
.cat-nose {
    position: absolute;
    width: 8px;
    height: 6px;
    background: #ff9db5;
    border-radius: 50% 50% 40% 40%;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
}

/* Рот */
.cat-mouth {
    position: absolute;
    width: 12px;
    height: 6px;
    border: 2px solid #444;
    border-top: none;
    border-radius: 0 0 10px 10px;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
}

/* Усы */
.cat-whiskers {
    position: absolute;
    height: 2px;
    background: #bbb;
    border-radius: 1px;
}

.cat-whiskers.left {
    width: 22px;
    top: 37px;
    left: 8px;
    transform: scaleX(-1);
}

.cat-whiskers.left::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #bbb;
    border-radius: 1px;
    top: -6px;
    left: 0;
    transform: rotate(-15deg);
}

.cat-whiskers.left::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #bbb;
    border-radius: 1px;
    top: 6px;
    left: 0;
    transform: rotate(15deg);
}

.cat-whiskers.right {
    width: 22px;
    top: 37px;
    right: 8px;
}

.cat-whiskers.right::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #bbb;
    border-radius: 1px;
    top: -6px;
    right: 0;
    transform: rotate(15deg);
}

.cat-whiskers.right::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #bbb;
    border-radius: 1px;
    top: 6px;
    right: 0;
    transform: rotate(-15deg);
}

/* Тело */
.cat-body {
    position: absolute;
    width: 50px;
    height: 25px;
    background: #2a2a2a;
    border-radius: 25px 25px 15px 15px;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
}

/* Лапки */
.cat-paw {
    position: absolute;
    width: 12px;
    height: 15px;
    background: #2a2a2a;
    border-radius: 5px 5px 8px 8px;
    bottom: -10px;
}

.cat-paw.left {
    left: 8px;
}

.cat-paw.right {
    right: 8px;
}

.cat-paw::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 4px;
    background: #444;
    border-radius: 50%;
}

/* Хвост */
.cat-tail {
    position: absolute;
    width: 8px;
    height: 25px;
    background: #2a2a2a;
    border-radius: 4px;
    top: 65px;
    right: 20px;
    transform-origin: bottom center;
    animation: tailWag 1s ease-in-out infinite;
}

.cat-tail::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 8px;
    height: 10px;
    background: #2a2a2a;
    border-radius: 50%;
}

@keyframes tailWag {

    0%,
    100% {
        transform: rotate(-20deg);
    }

    50% {
        transform: rotate(20deg);
    }
}


/* Счётчик посетителей */
.visitor-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
    padding: 8px 15px;
    background: var(--surface);
    border: 1px solid var(--accent-dim);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.counter-label {
    color: var(--text-dim);
}

.counter-value {
    color: var(--accent);
    font-weight: bold;
    font-size: 1rem;
}

.counter-today {
    color: var(--text-dim);
    font-size: 0.7rem;
    border-left: 1px solid var(--accent-dim);
    padding-left: 10px;
}

.counter-today span {
    color: var(--accent);
}

@media (max-width: 768px) {
    .loading-ascii {
        font-size: 0.35rem;
    }

    .eye-container {
        gap: 10px;
    }

    .eye {
        width: 35px;
        height: 35px;
    }

    .pupil {
        width: 14px;
        height: 14px;
    }

    .visitor-counter {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Achievement System */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: -400px;
    width: 350px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10001;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-notification.show {
    right: 20px;
}

.achievement-icon {
    font-size: 3rem;
    animation: achievementBounce 0.5s ease-in-out;
}

@keyframes achievementBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

.achievement-text {
    flex: 1;
}

.achievement-title {
    color: #ffd700;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
}

.achievement-desc {
    color: #888;
    font-size: 0.85rem;
    margin-top: 3px;
}

/* Achievements Modal */
.achievements-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.achievements-content {
    background: var(--surface);
    border: 2px solid var(--accent);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.achievements-content h2 {
    color: #ffd700;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 1.5rem;
}

.achievement-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.achievement-card.unlocked {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.achievement-card.locked {
    opacity: 0.5;
}

.achievement-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.achievement-card-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-card-desc {
    color: #888;
    font-size: 0.75rem;
}

.achievements-close {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.achievements-close:hover {
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.5);
}

@media (max-width: 768px) {
    .achievement-notification {
        width: 90%;
        right: -100%;
    }

    .achievement-notification.show {
        right: 5%;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile achievements button */
.mobile-achievements-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #ffd700;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 5px 25px rgba(255, 215, 0, 0.3);
    animation: pulseGold 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mobile-achievements-btn:hover,
.mobile-achievements-btn:active {
    transform: scale(1.1);
    box-shadow: 0 5px 35px rgba(255, 215, 0, 0.5);
}

@keyframes pulseGold {

    0%,
    100% {
        box-shadow: 0 5px 25px rgba(255, 215, 0, 0.3);
    }

    50% {
        box-shadow: 0 5px 35px rgba(255, 215, 0, 0.6);
    }
}

/* Hide shake hint text on desktop */
.shake-hint {
    display: none;
}

@media (max-width: 768px) {
    .shake-hint {
        display: block;
        text-align: center;
        color: #555;
        font-size: 0.8rem;
        margin-top: 1rem;
    }
}

/* AFK Message Bubble */
.afk-bubble {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid var(--accent);
    border-radius: 20px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0, 255, 157, 0.3);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.afk-bubble.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.afk-emoji {
    font-size: 2.5rem;
    animation: afkBounce 1s ease-in-out infinite;
}

@keyframes afkBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.afk-text {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
}

.afk-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ff5f56;
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.afk-close:hover {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .afk-bubble {
        width: 90%;
        bottom: 90px;
    }
}