* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #1A1A1F;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    touch-action: manipulation;
}

.hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    background: linear-gradient(180deg, rgba(58, 58, 66, 0.95) 0%, rgba(42, 42, 47, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(90, 90, 101, 0.8);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    font-weight: bold;
    font-size: 14px;
    color: #D4C4A0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

#game-container {
    position: fixed;
    top: 50px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 50px);
    overflow: hidden;
    background: #2A2A2F;
    clip-path: inset(0 0 0 0);
    -webkit-touch-callout: none;
    touch-action: none;
}

#game-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 50px) !important;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: contain;
    -webkit-touch-callout: none;
    touch-action: none;
}


.hud-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(26, 26, 31, 0.6);
    border: 2px solid #4A4A52;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hud-item::before {
    font-size: 24px;
}

.hud span {
    color: #F4E4C0;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.level-complete {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #3A3A42 0%, #2A2A2F 100%);
    padding: 50px 60px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    z-index: 2000;
    border: 5px solid #5A5A65;
}

.level-complete::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #6A6A75, #4A4A52, #6A6A75);
    border-radius: 12px;
    z-index: -1;
}

.level-complete::after {
    content: '⚔';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    text-shadow: 0 0 20px rgba(212, 196, 160, 0.8);
}

.level-complete h2 {
    color: #D4C4A0;
    margin-bottom: 25px;
    font-size: 32px;
    font-family: 'Georgia', serif;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    border-bottom: 2px solid #6A6A75;
    padding-bottom: 15px;
}

.level-complete p {
    margin: 20px 0;
    font-size: 20px;
    color: #C4B4A0;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.level-complete button {
    background: linear-gradient(135deg, #6A5A4A 0%, #5A4A3A 100%);
    color: #F4E4C0;
    border: 3px solid #8A7A6A;
    padding: 15px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    margin-top: 25px;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.level-complete button:hover {
    background: linear-gradient(135deg, #7A6A5A 0%, #6A5A4A 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border-color: #9A8A7A;
}

.level-complete button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.multiplier-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #3A3A42 0%, #2A2A2F 100%);
    padding: 50px 60px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    z-index: 2000;
    border: 5px solid #5A5A65;
}

.multiplier-screen h2 {
    color: #D4C4A0;
    margin-bottom: 25px;
    font-size: 32px;
    font-family: 'Georgia', serif;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    border-bottom: 2px solid #6A6A75;
    padding-bottom: 15px;
}

.multiplier-screen p {
    margin: 20px 0;
    font-size: 20px;
    color: #C4B4A0;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.multiplier-wheel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    font-size: 48px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.multiplier-value {
    display: inline-block;
    padding: 20px 40px;
    background: linear-gradient(135deg, #4A4A52 0%, #3A3A42 100%);
    border: 3px solid #FFD700;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    transition: transform 0.1s;
}

.multiplier-value.spinning {
    animation: spin 0.1s linear infinite;
}

@keyframes spin {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

.ad-icon {
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
    width: 24px;
    height: 16px;
    background: #B8860B;
    border-radius: 2px;
    position: relative;
    box-shadow:
        0 -4px 0 0 #B8860B,
        0 4px 0 0 #B8860B;
}

.ad-icon::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 2px;
    right: 2px;
    height: 4px;
    background:
        repeating-linear-gradient(90deg,
            #535355 0px, #535355 3px,
            transparent 3px, transparent 5px);
}

.ad-icon::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 2px;
    right: 2px;
    height: 4px;
    background:
        repeating-linear-gradient(90deg,
            #535355 0px, #535355 3px,
            transparent 3px, transparent 5px);
}

.ad-icon>span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
    width: 0;
    height: 0;
    border-left: 8px solid #4A4A55;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.multiplier-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
}

.skip-link {
    color: #8A8A95;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Georgia', serif;
    transition: all 0.3s;
    cursor: pointer;
    opacity: 0;
    animation: fadeInSkip 0.3s ease-in 1s forwards;
}

@keyframes fadeInSkip {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skip-link:hover {
    color: #B0B0BA;
    text-decoration: underline;
}

.multiplier-screen button {
    background: linear-gradient(135deg, #6A5A4A 0%, #5A4A3A 100%);
    color: #F4E4C0;
    border: 3px solid #8A7A6A;
    padding: 15px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.multiplier-screen button:hover {
    background: linear-gradient(135deg, #7A6A5A 0%, #6A5A4A 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border-color: #9A8A7A;
}

.multiplier-screen button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.multiplier-screen button.primary {
    background: linear-gradient(135deg, #D4A650 0%, #B48C40 100%);
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(212, 166, 80, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.multiplier-screen button.primary:hover {
    background: linear-gradient(135deg, #E4B660 0%, #C49C50 100%);
}

/* Кнопка Рун */
.runes-button {
    background: linear-gradient(135deg, rgba(106, 90, 74, 0.6) 0%, rgba(90, 74, 58, 0.6) 100%);
    color: #F4E4C0;
    border: 2px solid rgba(138, 122, 106, 0.6);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

/* Кнопка звука */
.sound-button {
    background: linear-gradient(135deg, rgba(106, 90, 74, 0.6) 0%, rgba(90, 74, 58, 0.6) 100%);
    color: #F4E4C0;
    border: 2px solid rgba(138, 122, 106, 0.6);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    width: 44px;
}

.sound-button:hover {
    background: linear-gradient(135deg, rgba(122, 106, 90, 0.8) 0%, rgba(106, 90, 74, 0.8) 100%);
    border-color: rgba(154, 138, 122, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.sound-button:active {
    transform: translateY(0);
    background: rgba(90, 74, 58, 0.7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sound-button.muted {
    background: linear-gradient(135deg, rgba(90, 74, 58, 0.4) 0%, rgba(70, 54, 38, 0.4) 100%);
    border-color: rgba(100, 84, 68, 0.4);
    opacity: 0.6;
}

.runes-button:hover {
    background: linear-gradient(135deg, rgba(122, 106, 90, 0.8) 0%, rgba(106, 90, 74, 0.8) 100%);
    border-color: rgba(154, 138, 122, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.runes-button:active {
    transform: translateY(0);
    background: rgba(90, 74, 58, 0.7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.runes-icon {
    font-size: 15px;
    color: #D4A650;
    text-shadow: 0 0 10px rgba(212, 166, 80, 0.8);
}

/* Модальное окно коллекции рун */
.rune-collection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.rune-collection-content {
    background: linear-gradient(135deg, #3A3A42 0%, #2A2A2F 100%);
    border: 5px solid #5A5A65;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.rune-collection-header {
    position: relative;
    padding: 40px 60px 20px;
    border-bottom: 3px solid #5A5A65;
    background: linear-gradient(180deg, #4A4A52 0%, #3A3A42 100%);
}

.rune-collection-header h2 {
    color: #D4C4A0;
    font-size: 32px;
    font-family: 'Georgia', serif;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    margin: 30px 0 10px 0;
    text-align: center;
}

.collection-progress {
    color: #C4B4A0;
    font-size: 18px;
    font-family: 'Georgia', serif;
    text-align: center;
    margin: 10px 0 0 0;
}

.collection-progress span {
    color: #FFD700;
    font-weight: bold;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: #F4E4C0;
    border: 2px solid #6A6A75;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: #8A8A95;
    transform: rotate(90deg);
}

/* Сетка рун */
.runes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 30px;
}

.rune-item {
    position: relative;
    background: rgba(26, 26, 31, 0.6);
    border: 2px solid #4A4A52;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rune-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
    border-color: #6A6A75;
}

.rune-item.completed {
    border-color: #D4A650;
    box-shadow: 0 0 15px rgba(212, 166, 80, 0.4);
}

.rune-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    isolation: isolate;
}

.rune-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.rune-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(42, 42, 47, 0.85);
    transition: height 0.3s ease;
    z-index: 1;
    will-change: height;
}

.rune-item.completed .rune-progress-overlay {
    display: none;
}

.rune-progress-text {
    color: #FFD700;
    font-size: 14px;
    font-weight: bold;
    margin-top: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.rune-item.completed .rune-progress-text {
    color: #4AFF4A;
}

.rune-info {
    color: #C4B4A0;
    font-size: 11px;
    margin-top: 4px;
}

/* Уведомление о завершении руны */
.rune-completed-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #3A3A42 0%, #2A2A2F 100%);
    border: 5px solid #D4A650;
    border-radius: 12px;
    padding: 40px;
    z-index: 4000;
    text-align: center;
    box-shadow: 0 0 50px rgba(212, 166, 80, 0.8),
        0 20px 60px rgba(0, 0, 0, 0.9);
    animation: notificationAppear 0.5s ease-out;
}

@keyframes notificationAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.rune-completed-notification.fade-out {
    animation: notificationFadeOut 0.5s ease-out forwards;
}

@keyframes notificationFadeOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

.notification-content h3 {
    color: #FFD700;
    font-size: 28px;
    font-family: 'Georgia', serif;
    margin: 0 0 20px 0;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.notification-rune-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin: 20px auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(212, 166, 80, 0.6));
}

.notification-content p {
    color: #D4C4A0;
    font-size: 18px;
    font-family: 'Georgia', serif;
    margin: 15px 0;
}

.notification-reward {
    color: #FFD700;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Модальное окно детального просмотра руны */
.rune-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.rune-detail-content {
    position: relative;
    background: linear-gradient(135deg, #3A3A42 0%, #2A2A2F 100%);
    border: 5px solid #D4A650;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(212, 166, 80, 0.8),
        0 20px 60px rgba(0, 0, 0, 0.9);
    padding: 40px;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.rune-detail-image-container {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.rune-detail-image {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(212, 166, 80, 0.8));
    transition: filter 0.3s ease;
}

.progress-circle {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: rgba(90, 90, 101, 0.3);
    stroke-width: 8;
}

.progress-circle-fill {
    fill: none;
    stroke: #D4A650;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    font-size: 16px;
    font-weight: bold;
    fill: #FFD700;
    text-anchor: middle;
    dominant-baseline: middle;
    transform: rotate(90deg);
    transform-origin: center;
}

.rune-detail-image.blurred {
    filter: blur(15px) brightness(0.5);
}

.rune-detail-info h2 {
    color: #FFD700;
    font-size: 32px;
    font-family: 'Georgia', serif;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    margin-bottom: 20px;
    text-align: center;
}

.rune-detail-info p {
    color: #D4C4A0;
    font-size: 18px;
    font-family: 'Georgia', serif;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: justify;
    transition: filter 0.3s ease, color 0.3s ease;
}

.rune-detail-info p.blurred {
    filter: blur(8px);
    color: #6A6A75;
    user-select: none;
    pointer-events: none;
}

.rune-detail-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: rgba(26, 26, 31, 0.6);
    border: 2px solid #5A5A65;
    border-radius: 8px;
}

.detail-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Georgia', serif;
    font-size: 16px;
}

.stat-label {
    color: #C4B4A0;
    font-weight: bold;
}

.detail-stat span:last-child {
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.rune-item {
    cursor: pointer;
}

.rune-item:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Индикатор заблокированной руны */
.rune-detail-content.locked::before {
    content: attr(data-locked-text);
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 31, 0.9);
    color: #FFD700;
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid #D4A650;
    font-family: 'Georgia', serif;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Кнопка профиля */
.profile-button {
    background: linear-gradient(135deg, rgba(106, 90, 74, 0.6) 0%, rgba(90, 74, 58, 0.6) 100%);
    color: #F4E4C0;
    border: 2px solid rgba(138, 122, 106, 0.6);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.profile-button:hover {
    background: linear-gradient(135deg, rgba(122, 106, 90, 0.8) 0%, rgba(106, 90, 74, 0.8) 100%);
    border-color: rgba(154, 138, 122, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.profile-button:active {
    transform: translateY(0);
    background: rgba(90, 74, 58, 0.7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Кнопка золота */
.gold-button {
    background: linear-gradient(135deg, rgba(212, 166, 80, 0.6) 0%, rgba(180, 140, 64, 0.6) 100%);
    color: #F4E4C0;
    border: 2px solid rgba(255, 215, 0, 0.6);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.gold-button:hover {
    background: linear-gradient(135deg, rgba(228, 182, 96, 0.8) 0%, rgba(196, 156, 80, 0.8) 100%);
    border-color: rgba(255, 228, 77, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.gold-button:active {
    transform: translateY(0);
    background: rgba(180, 140, 64, 0.7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Модальное окно магазина обоев */
.wallpaper-shop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.wallpaper-shop-content {
    background: linear-gradient(135deg, #3A3A42 0%, #2A2A2F 100%);
    border: 5px solid #5A5A65;
    border-radius: 12px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.wallpaper-shop-header {
    position: relative;
    padding: 40px 60px 20px;
    border-bottom: 3px solid #5A5A65;
    background: linear-gradient(180deg, #4A4A52 0%, #3A3A42 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wallpaper-shop-header h2 {
    color: #D4C4A0;
    font-size: 32px;
    font-family: 'Georgia', serif;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    margin: 30px 0 10px 0;
    text-align: center;
}

.shop-gold {
    color: #FFD700;
    font-size: 20px;
    font-family: 'Georgia', serif;
    text-align: center;
    margin: 10px 0;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Кнопка заработка золота в магазине */
.earn-gold-btn {
    background: linear-gradient(135deg, #D4A650 0%, #B48C40 100%);
    color: #F4E4C0;
    border: 3px solid #FFD700;
    padding: 15px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(212, 166, 80, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px auto;
    line-height: 1;
}

.earn-gold-btn:hover {
    background: linear-gradient(135deg, #E4B660 0%, #C49C50 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border-color: #FFE44D;
}

.earn-gold-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Сетка обоев */
.wallpapers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 30px;
}

.wallpaper-item {
    background: rgba(26, 26, 31, 0.6);
    border: 2px solid #4A4A52;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.wallpaper-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
    border-color: #6A6A75;
}

.wallpaper-item.purchased {
    border-color: #4AFF4A;
    box-shadow: 0 0 15px rgba(74, 255, 74, 0.3);
}

.wallpaper-preview {
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 10px;
    position: relative;
    transition: filter 0.3s ease;
}

.wallpaper-preview.blurred {
    filter: blur(10px) brightness(0.6);
}

.wallpaper-shelf-preview {
    height: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.wallpaper-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wallpaper-info h3 {
    color: #D4C4A0;
    font-size: 20px;
    font-family: 'Georgia', serif;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.wallpaper-description {
    color: #C4B4A0;
    font-size: 14px;
    font-family: 'Georgia', serif;
    line-height: 1.4;
    margin: 10px 0;
    min-height: 60px;
}

.wallpaper-price {
    color: #FFD700;
    font-size: 22px;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.wallpaper-price.free-price {
    color: #4AFF4A;
    text-shadow: 0 0 10px rgba(74, 255, 74, 0.6);
}

.wallpaper-btn {
    width: 100%;
    background: linear-gradient(135deg, #6A5A4A 0%, #5A4A3A 100%);
    color: #F4E4C0;
    border: 3px solid #8A7A6A;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-top: auto;
}

.wallpaper-btn:hover {
    background: linear-gradient(135deg, #7A6A5A 0%, #6A5A4A 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
    border-color: #9A8A7A;
}

.wallpaper-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.wallpaper-btn.select-btn {
    background: linear-gradient(135deg, #6A6A7A 0%, #5A5A6A 100%);
    border-color: #8A8A9A;
}

.wallpaper-btn.select-btn:hover {
    background: linear-gradient(135deg, #7A7A8A 0%, #6A6A7A 100%);
    border-color: #9A9AAA;
}

.wallpaper-btn.active-btn {
    background: linear-gradient(135deg, #4A7A4A 0%, #3A6A3A 100%);
    border-color: #4AFF4A;
    cursor: default;
    box-shadow: 0 0 15px rgba(74, 255, 74, 0.4);
}

.wallpaper-btn.active-btn:hover {
    transform: none;
    background: linear-gradient(135deg, #4A7A4A 0%, #3A6A3A 100%);
    box-shadow: 0 0 15px rgba(74, 255, 74, 0.4);
}

/* Уведомления */
.notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3A3A42 0%, #2A2A2F 100%);
    border: 3px solid #5A5A65;
    border-radius: 8px;
    padding: 15px 30px;
    z-index: 6000;
    font-family: 'Georgia', serif;
    font-size: 18px;
    font-weight: bold;
    color: #F4E4C0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.notification.fade-out {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

.notification-success {
    border-color: #4AFF4A;
    box-shadow: 0 0 20px rgba(74, 255, 74, 0.4);
}

.notification-error {
    border-color: #FF4A4A;
    box-shadow: 0 0 20px rgba(255, 74, 74, 0.4);
}

/* Модальное окно профиля игрока */
.player-profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.player-profile-content {
    background: linear-gradient(135deg, #3A3A42 0%, #2A2A2F 100%);
    border: 5px solid #5A5A65;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.player-profile-header {
    position: relative;
    padding: 40px 60px 20px;
    border-bottom: 3px solid #5A5A65;
    background: linear-gradient(180deg, #4A4A52 0%, #3A3A42 100%);
}

.player-profile-header h2 {
    color: #D4C4A0;
    font-size: 32px;
    font-family: 'Georgia', serif;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    margin: 30px 0 0 0;
    text-align: center;
}

.player-profile-body {
    padding: 30px;
}

.player-avatar-section {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #5A5A65;
}

.player-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid #D4A650;
    box-shadow: 0 0 20px rgba(212, 166, 80, 0.6);
    margin: 0 auto 15px;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.player-avatar-section h3 {
    color: #FFD700;
    font-size: 28px;
    font-family: 'Georgia', serif;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    margin: 0;
}

.player-avatar-section.no-avatar::before {
    content: '?';
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    border: 5px solid #D4A650;
    box-shadow: 0 0 20px rgba(212, 166, 80, 0.6);
    background: linear-gradient(135deg, #3A3A42 0%, #2A2A2F 100%);
    color: #D4A650;
    font-size: 72px;
    font-weight: bold;
    font-family: 'Georgia', serif;
    line-height: 120px;
    text-align: center;
    text-shadow: 0 0 15px rgba(212, 166, 80, 0.8);
}

.player-stats-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    background: rgba(26, 26, 31, 0.6);
    border: 2px solid #4A4A52;
    border-radius: 8px;
    padding: 15px 20px;
    transition: all 0.3s;
}

.stat-item:hover {
    border-color: #6A6A75;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    font-size: 36px;
    margin-right: 20px;
    filter: drop-shadow(0 0 10px rgba(212, 166, 80, 0.6));
}

.stat-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.stat-label {
    color: #C4B4A0;
    font-size: 14px;
    font-family: 'Georgia', serif;
    margin-bottom: 5px;
}

.stat-value {
    color: #FFD700;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Georgia', serif;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Адаптивность для level-complete в горизонтальной ориентации */
@media (max-height: 450px) and (orientation: landscape) {
    .level-complete {
        padding: 15px 25px;
        max-width: 80vw;
    }

    .level-complete h2 {
        font-size: 20px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .level-complete p {
        margin: 8px 0;
        font-size: 14px;
    }

    .level-complete button {
        padding: 10px 24px;
        font-size: 14px;
        margin-top: 10px;
    }

    .level-complete::after {
        top: -20px;
        font-size: 32px;
    }
}

@media (min-height: 450px) and (max-height: 600px) and (orientation: landscape) {
    .level-complete {
        padding: 25px 35px;
    }

    .level-complete h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .level-complete p {
        margin: 12px 0;
        font-size: 16px;
    }

    .level-complete button {
        padding: 12px 30px;
        font-size: 16px;
        margin-top: 15px;
    }

    .level-complete::after {
        top: -25px;
        font-size: 40px;
    }
}

/* Адаптивность для вертикальной ориентации на маленьких экранах */
@media (max-width: 400px) and (orientation: portrait) {
    .multiplier-screen {
        padding: 15px 20px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .multiplier-screen h2 {
        font-size: 22px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .multiplier-screen p {
        margin: 8px 0;
        font-size: 14px;
    }

    .multiplier-wheel {
        margin: 12px 0;
        font-size: 36px;
    }

    .multiplier-value {
        padding: 12px 20px;
    }

    .multiplier-buttons {
        gap: 10px;
        margin-top: 12px;
    }

    .multiplier-screen button {
        padding: 12px 28px;
        font-size: 16px;
    }

    .skip-link {
        font-size: 13px;
    }
}

/* Адаптивность для горизонтальной ориентации */
@media (max-height: 450px) and (orientation: landscape) {
    .multiplier-screen {
        padding: 10px 20px;
        max-height: 95vh;
        overflow-y: auto;
    }

    .multiplier-screen h2 {
        font-size: 16px;
        margin-bottom: 5px;
        padding-bottom: 5px;
    }

    .multiplier-screen p {
        margin: 4px 0;
        font-size: 12px;
    }

    .multiplier-wheel {
        margin: 8px 0;
        font-size: 24px;
    }

    .multiplier-value {
        padding: 8px 16px;
        border-width: 2px;
    }

    .multiplier-buttons {
        gap: 8px;
        margin-top: 8px;
    }

    .multiplier-screen button {
        padding: 8px 16px;
        font-size: 12px;
    }

    .skip-link {
        font-size: 11px;
    }
}

@media (min-height: 450px) and (max-height: 600px) and (orientation: landscape) {
    .multiplier-screen {
        padding: 20px 30px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .multiplier-screen h2 {
        font-size: 20px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .multiplier-screen p {
        margin: 8px 0;
        font-size: 14px;
    }

    .multiplier-wheel {
        margin: 15px 0;
        font-size: 32px;
    }

    .multiplier-value {
        padding: 12px 24px;
    }

    .multiplier-buttons {
        gap: 12px;
        margin-top: 15px;
    }

    .multiplier-screen button {
        padding: 10px 24px;
        font-size: 14px;
    }

    .skip-link {
        font-size: 12px;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {

    .level-complete {
        padding: 30px 40px;
        max-width: 90vw;
    }

    .level-complete h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .level-complete p {
        font-size: 16px;
        margin: 12px 0;
    }

    .level-complete button {
        font-size: 16px;
        padding: 12px 30px;
        margin-top: 15px;
    }

    .level-complete::after {
        font-size: 36px;
    }

    .hud {
        gap: 6px;
        padding: 0 8px;
        font-size: 11px;
    }

    .profile-button,
    .gold-button,
    .runes-button {
        padding: 6px 8px;
        font-size: 11px;
        gap: 4px;
    }

    .sound-button {
        padding: 6px;
        min-width: 36px;
        width: 36px;
    }

    .sound-button #sound-icon {
        font-size: 16px !important;
    }

    .profile-button span:first-child,
    .gold-button span:first-child {
        font-size: 16px !important;
    }

    .runes-icon {
        font-size: 13px;
    }

    .runes-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
        padding: 20px;
    }

    .rune-collection-header {
        padding: 20px 40px 15px;
    }

    .rune-collection-header h2 {
        font-size: 24px;
    }

    .collection-progress {
        font-size: 14px;
    }

    .notification-rune-image {
        width: 100px;
        height: 100px;
    }

    .rune-detail-content {
        padding: 70px 20px;
    }

    .rune-detail-info h2 {
        font-size: 24px;
    }

    .rune-detail-info p {
        font-size: 16px;
    }

    .rune-detail-image {
        max-width: 150px;
        max-height: 150px;
    }

    .rune-detail-image-container {
        min-height: 150px;
    }

    .progress-circle {
        width: 150px;
        height: 150px;
    }

    .progress-text {
        font-size: 14px;
    }

    .wallpapers-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 20px;
    }

    .wallpaper-shop-header {
        padding: 20px 40px 15px;
    }

    .wallpaper-shop-header h2 {
        font-size: 24px;
    }

    .player-profile-header {
        padding: 20px 40px 15px;
    }

    .player-profile-header h2 {
        font-size: 24px;
    }

    .player-avatar {
        width: 80px;
        height: 80px;
    }

    .player-avatar-section h3 {
        font-size: 22px;
    }

    .stat-icon {
        font-size: 28px;
        margin-right: 15px;
    }

    .stat-value {
        font-size: 20px;
    }
}

/* Адаптивность для мобильных в горизонтальной ориентации */
@media (max-width: 768px) and (max-height: 450px) and (orientation: landscape) {
    .level-complete {
        padding: 10px 20px;
        max-width: 85vw;
    }

    .level-complete h2 {
        font-size: 18px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .level-complete p {
        font-size: 13px;
        margin: 6px 0;
    }

    .level-complete button {
        font-size: 13px;
        padding: 8px 20px;
        margin-top: 8px;
    }

    .level-complete::after {
        top: -18px;
        font-size: 28px;
    }

    .level-complete::before {
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
    }
}