@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@900&display=swap');

body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Orbitron', sans-serif;
    user-select: none;
}

#game-container {
    position: relative;
    width: 900px;
    height: 500px;
    box-shadow: 0 0 80px rgba(0, 242, 255, 0.15);
    border: 1px solid #222;
    background: #050505;
    overflow: hidden;
}

canvas { display: block; }

.vignette {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0) 50%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 11;
}

#ui {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0s;
}

h1 {
    font-size: 5rem;
    margin: 0;
    color: #fff;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 5px;
    text-shadow: 
        4px 4px 0px #ff0055, 
        -4px -4px 0px #00f2ff;
    animation: glitchText 2s infinite;
}

p {
    font-size: 1.2rem;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border: 1px solid #fff;
    margin-top: 20px;
    letter-spacing: 2px;
    animation: blink 0.8s infinite;
}

#high-score-display {
    font-size: 1.5rem;
    color: #ffe600;
    margin-top: 10px;
    text-shadow: 0 0 10px #ffe600;
}

/* --- КОНТЕЙНЕРЫ МЕНЮ (Уменьшаем расстояние между кнопками) --- */
#main-menu, #difficulty-selector, #levels-menu {
    display: flex;
    flex-direction: column;
    /* Уменьшил отступ между элементами с 15px до 8px */
    gap: 15px; 
    margin-top: 20px;
    pointer-events: auto;
    align-items: center;
}

/* --- ОСНОВНАЯ КНОПКА (Компактная версия) --- */
.cyber-btn {
    /* Сильно уменьшил внутренние отступы */
    padding: 10px 20px; 
    
    /* Уменьшил шрифт и ширину */
    font-size: 1rem;
    min-width: 220px; 
    letter-spacing: 2px; /* Чуть меньше разрядка букв */

    /* Стиль (прозрачность и неон) сохраняется */
    clip-path: none; 
    border-radius: 3px; 
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00f2ff;
    
    box-shadow: 
        0 0 8px rgba(0, 242, 255, 0.4), 
        inset 0 0 10px rgba(0, 242, 255, 0.2);
    
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.8);
    
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
    /* Убрал margin-bottom, так как используем gap в контейнере */
    margin-bottom: 0; 
}

/* Убираем старую декоративную полоску */
.cyber-btn::after {
    display: none;
}

/* Эффект наведения */
.cyber-btn:hover {
    background: rgba(0, 242, 255, 0.15);
    transform: scale(1.03); /* Меньше увеличение, чтобы не прыгало */
    box-shadow: 
        0 0 15px #00f2ff, 
        inset 0 0 15px rgba(0, 242, 255, 0.4);
    text-shadow: 0 0 10px #fff;
    border-color: #fff;
}

.cyber-btn:active {
    transform: scale(0.98);
}

/* --- КНОПКИ BACK И DELETE (Совсем маленькие) --- */
.back-btn, 
.level-btn[data-action="delete"] {
    padding: 4px 15px;
    font-size: 0.8rem;
    min-width: 30px;
    
    border: 2px solid #ff0055;
    color: #ffb3cc;
    box-shadow: 
        0 0 8px rgba(255, 0, 85, 0.4), 
        inset 0 0 8px rgba(255, 0, 85, 0.2);
    text-shadow: 0 0 4px #ff0055;
}

.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    margin-top: 0 !important;
    z-index: 100;
    pointer-events: auto;
}

.back-btn:hover,
.level-btn[data-action="delete"]:hover {
    background: rgba(255, 0, 85, 0.15);
    box-shadow: 
        0 0 15px #ff0055, 
        inset 0 0 10px rgba(255, 0, 85, 0.5);
    color: #fff;
    border-color: #fff;
}

/* --- ВЫБРАННАЯ СЛОЖНОСТЬ --- */
.difficulty-btn.selected {
    background: #00f2ff;
    color: #000;
    box-shadow: 0 0 20px #00f2ff;
    border-color: #fff;
    text-shadow: none;
}

/* --- НЕАКТИВНЫЕ КНОПКИ --- */
.cyber-btn.inactive {
    border-color: #444;
    color: #666;
    box-shadow: none;
    text-shadow: none;
    background: rgba(0,0,0,0.5);
    cursor: not-allowed;
    opacity: 0.7;
}

.cyber-btn.inactive:hover {
    transform: none;
    box-shadow: none;
}

#ui {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0s;
    background: rgba(0, 0, 0, 0.2);
}

#skin-selector {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 25;
    pointer-events: auto;
}

.skin-canvas {
    width: 50px;
    height: 50px;
    border: 3px solid #444;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    border-radius: 4px;
    background: #111;
}

.skin-canvas:hover {
    transform: scale(1.1);
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.skin-canvas.selected {
    border-color: #00f2ff;
    box-shadow: 0 0 30px #00f2ff, inset 0 0 10px #00f2ff;
}

/* --- SETTINGS STYLES --- */
#settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 50;
    color: #fff;
    opacity: 0.7;
    pointer-events: auto;
    transition: transform 0.3s;
}

#settings-btn:hover { 
    transform: rotate(90deg); 
    opacity: 1; 
    text-shadow: 0 0 10px #fff; 
}

#settings-modal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00f2ff;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.2);
    padding: 20px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
    text-align: center;
}

.setting-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.setting-row label {
    color: #00f2ff;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

input[type=range] {
    width: 100%;
    cursor: pointer;
    accent-color: #ff0055;
}

#close-settings {
    margin-top: 10px;
    padding: 8px;
    background: #00f2ff;
    border: none;
    color: #000;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    cursor: pointer;
}

#close-settings:hover { 
    background: #fff; 
}

#return-to-menu {
    margin-top: 10px;
    padding: 8px;
    background: #ff0055;
    border: none;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    cursor: pointer;
}

#return-to-menu:hover { 
    background: #ff0077;
    box-shadow: 0 0 20px #ff0055;
}

/* --- PRESET LEVELS MODAL --- */
#presets-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 120;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.presets-content {
    max-width: 850px !important;
    width: 90% !important;
    background: rgba(5, 5, 10, 0.95) !important;
    border: 3px solid #00f2ff !important;
    box-shadow: 0 0 60px rgba(0, 242, 255, 0.3) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.presets-scroller {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    width: 100%;
    padding: 20px 10px;
    margin-bottom: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #00f2ff rgba(0,0,0,0.5);
}

.presets-scroller::-webkit-scrollbar {
    height: 8px;
}

.preset-card {
    flex: 0 0 260px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    scroll-snap-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.preset-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: #00f2ff;
    background: rgba(0, 242, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.2);
}

.preset-card.completed {
    border-color: #00ff88;
}

.preset-card h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.preset-preview {
    width: 100%;
    height: 120px;
    background: #000;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
}

.preset-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.preset-progress-container {
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #333;
}

.preset-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00f2ff, #00ff88);
    width: 0%;
    transition: width 1s ease-out;
}

.preset-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
}

.preset-play-btn {
    margin-top: 5px;
    padding: 10px;
    background: transparent;
    border: 2px solid #00f2ff;
    color: #00f2ff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preset-play-btn:hover {
    background: #00f2ff;
    color: #000;
    box-shadow: 0 0 15px #00f2ff;
}

.completed-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #00ff88;
    font-size: 1.2rem;
    text-shadow: 0 0 10px #00ff88;
}

@keyframes glitchText {
    0% { transform: skew(0deg); }
    20% { transform: skew(-2deg); }
    40% { transform: skew(2deg); }
    60% { transform: skew(-1deg); }
    80% { transform: skew(1deg); }
    100% { transform: skew(0deg); }
}

@keyframes blink { 
    50% { opacity: 0.5; } 
}


.hidden { 
    opacity: 0; 
    pointer-events: none; 
    visibility: hidden;
    transition: opacity 0.3s, visibility 0s 0.3s;
}

.display-none { 
    display: none !important; 
}

/* --- EDITOR STYLES --- */
#editor-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    pointer-events: none;
}

.editor-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 250px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #ff0055;
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.3);
    padding: 15px;
    pointer-events: auto;
    max-height: calc(100% - 20px);
    overflow-y: auto;
}

.editor-panel h3 {
    margin: 0 0 15px 0;
    color: #ff0055;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 2px;
}

.editor-panel h4 {
    margin: 15px 0 10px 0;
    color: #00f2ff;
    font-size: 0.9rem;
    text-align: center;
    letter-spacing: 1px;
}

.editor-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.editor-tool {
    padding: 8px 12px;
    background: rgba(0, 242, 255, 0.1);
    border: 2px solid #00f2ff;
    color: #00f2ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.tool-icon {
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 242, 255, 0.3);
    flex-shrink: 0;
}

.editor-tool:hover {
    background: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.editor-tool.active {
    background: rgba(0, 242, 255, 0.3);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 20px #00f2ff;
}

.editor-color-section {
    margin-bottom: 15px;
    border-top: 1px solid #444;
    padding-top: 10px;
}

.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
}

.color-preset {
    width: 25px;
    height: 25px;
    border: 2px solid #444;
    cursor: pointer;
    transition: all 0.2s;
}

.color-preset:hover {
    transform: scale(1.2);
    border-color: #fff;
}

.color-preset.active {
    border-color: #fff;
    box-shadow: 0 0 10px #fff;
}

#editor-color-picker {
    width: 100%;
    height: 30px;
    background: transparent;
    border: 1px solid #444;
    cursor: pointer;
}

.editor-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    border-top: 1px solid #444;
    padding-top: 15px;
}

.editor-action-btn {
    padding: 8px;
    background: rgba(255, 230, 0, 0.1);
    border: 2px solid #ffe600;
    color: #ffe600;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-action-btn:hover {
    background: rgba(255, 230, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.3);
}

.editor-levels {
    border-top: 1px solid #444;
    padding-top: 10px;
    max-height: 300px;
    overflow-y: auto;
}

#levels-list,
#levels-list-modal {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.level-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
}

.level-preview-container {
    width: 100%;
    height: 80px;
    background: #000;
    border: 1px solid #ff0055;
    overflow: hidden;
    flex-shrink: 0;
}

.level-preview-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.level-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.level-item span {
    color: #00f2ff;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.level-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.level-btn {
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #666;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 60px;
}

.level-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.level-btn[data-action="play"] {
    border-color: #00ff00;
    color: #00ff00;
}

.level-btn[data-action="delete"] {
    border-color: #ff0055;
    color: #ff0055;
}

/* Levels Modal */
#levels-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.modal-content {
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #00f2ff;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.5);
    padding: 30px;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
    width: 90%;
}

.modal-content h2 {
    margin: 0 0 20px 0;
    color: #00f2ff;
    text-align: center;
    font-size: 1.8rem;
    letter-spacing: 3px;
}

.modal-close-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background: #ff0055;
    border: none;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    background: #ff0077;
    box-shadow: 0 0 20px #ff0055;
}

/* Scrollbar styling for editor */
.editor-panel::-webkit-scrollbar,
.editor-levels::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.editor-panel::-webkit-scrollbar-track,
.editor-levels::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.editor-panel::-webkit-scrollbar-thumb,
.editor-levels::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #00f2ff;
    border-radius: 4px;
}

.editor-panel::-webkit-scrollbar-thumb:hover,
.editor-levels::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #ff0055;
}

/* Level Complete Modal */
#level-complete-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    backdrop-filter: blur(5px);
}

#level-complete-modal .modal-content {
    background: rgba(5, 5, 10, 0.95);
    border: 3px solid #00ff88;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.4), inset 0 0 20px rgba(0, 255, 136, 0.2);
    padding: 50px;
    max-width: 650px;
    width: 85%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#level-complete-title {
    font-size: 4rem;
    margin: 0 0 10px 0;
    color: #fff;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 8px;
    text-shadow: 
        4px 4px 0px #00ff88, 
        -4px -4px 0px #00f2ff;
    animation: glitchText 2s infinite;
}

.modal-subtitle {
    font-size: 1.1rem;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    padding: 8px 15px;
    border: 1px solid #00ff88;
    margin-bottom: 30px;
    display: inline-block;
    letter-spacing: 3px;
    animation: blink 1.5s infinite;
}

.modal-button-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.modal-action-btn {
    padding: 15px 30px;
    background: transparent;
    border: 2px solid #00ff88;
    color: #00ff88;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.modal-action-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 30px #00ff88;
    transform: translateY(-2px);
    color: #fff;
    border-color: #fff;
}

.modal-action-btn.exit-btn {
    border-color: #ff0055;
    color: #ff0055;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.2);
}

.modal-action-btn.exit-btn:hover {
    background: rgba(255, 0, 85, 0.2);
    box-shadow: 0 0 30px #ff0055;
    border-color: #fff;
    color: #fff;
}

/* Death Modal Specific Styles */
#death-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 0, 5, 0.85);
    z-index: 105;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    backdrop-filter: blur(8px);
}

.death-content {
    border-color: #ff0055 !important;
    box-shadow: 0 0 50px rgba(255, 0, 85, 0.4), inset 0 0 20px rgba(255, 0, 85, 0.2) !important;
    text-align: center !important;
}

#death-title {
    font-size: 4rem;
    margin: 0 0 10px 0;
    color: #fff;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 8px;
    text-align: center;
    text-shadow: 
        4px 4px 0px #ff0055, 
        -4px -4px 0px #00f2ff;
    animation: glitchText 1.5s infinite;
}

.death-subtitle {
    color: #ff0055 !important;
    border-color: #ff0055 !important;
    background: rgba(255, 0, 85, 0.1) !important;
}

.death-btn {
    border-color: #00ff88 !important;
    color: #00ff88 !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2) !important;
}

.death-btn:hover {
    background: rgba(0, 255, 136, 0.2) !important;
    box-shadow: 0 0 30px #00ff88 !important;
    border-color: #fff !important;
    color: #fff !important;
}

/* Purchase Modal Styles */
#purchase-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 110;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.purchase-content {
    border-color: #ffe600 !important;
    box-shadow: 0 0 50px rgba(255, 230, 0, 0.3) !important;
    text-align: center;
}

.purchase-preview {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

#purchase-canvas {
    width: 100px;
    height: 100px;
    border: 2px solid #ffe600;
    background: #111;
    box-shadow: 0 0 20px rgba(255, 230, 0, 0.2);
}

#purchase-details {
    margin-bottom: 25px;
}

#purchase-details p {
    margin: 5px 0;
    padding: 5px 15px;
    border: none;
    background: transparent;
    animation: none;
}

.price-text {
    color: #ffe600;
    font-size: 1.4rem !important;
    text-shadow: 0 0 10px rgba(255, 230, 0, 0.5);
    transition: all 0.3s;
}

.glow-burst .price-text {
    color: #00ff88;
    text-shadow: 0 0 20px #00ff88;
    transform: scale(1.2);
}

.balance-text {
    color: #fff;
    font-size: 0.9rem !important;
    opacity: 0.8;
}

#btn-buy-skin {
    border-color: #ffe600;
    color: #ffe600;
}

#btn-buy-skin:hover {
    background: rgba(255, 230, 0, 0.2);
    box-shadow: 0 0 30px #ffe600;
    color: #fff;
    border-color: #fff;
}

.error-text {
    color: #ff0055;
    font-size: 0.8rem;
    margin-top: 10px;
    letter-spacing: 1px;
    text-shadow: 0 0 5px #ff0055;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.unlock-success {
    animation: unlockSuccess 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes unlockSuccess {
    0% { transform: scale(1); filter: brightness(1); }
    20% { transform: scale(1.4); filter: brightness(3) contrast(1.5); }
    40% { transform: scale(1.2) rotate(10deg); filter: brightness(2); }
    60% { transform: scale(1.3) rotate(-10deg); filter: brightness(2); }
    100% { transform: scale(1); filter: brightness(1); }
}

.glow-burst {
    animation: glowBurstAnim 1.2s ease-out forwards;
}

@keyframes glowBurstAnim {
    0% { 
        box-shadow: 0 0 50px rgba(255, 230, 0, 0.3);
        border-color: #ffe600;
    }
    20% { 
        box-shadow: 0 0 150px #00ff88, 0 0 200px rgba(0, 255, 136, 0.5);
        border-color: #00ff88;
        transform: scale(1.05);
    }
    100% { 
        box-shadow: 0 0 80px #00ff88;
        border-color: #00ff88;
        transform: scale(1);
    }
}

.purchase-content {
    position: relative;
    overflow: hidden;
}

.purchase-content::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg, 
        transparent 0%, 
        transparent 40%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 60%, 
        transparent 100%
    );
    transition: all 0s;
    pointer-events: none;
    z-index: 1;
}

.glow-burst::before {
    animation: shineMove 1.2s ease-out forwards;
}

@keyframes shineMove {
    0% { top: -100%; left: -100%; }
    100% { top: 100%; left: 100%; }
}
