@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@1,800;1,900&family=Outfit:wght@400;600;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
    background-color: #0f0c1b;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    cursor: crosshair;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(241, 196, 15, 0.6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(241, 196, 15, 0.9);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    touch-action: none;
    background: #131124;
}

#ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
}

#main-menu,
#skin-modal,
#settings-modal,
#confirm-modal,
#game-over {
    pointer-events: auto !important;
}

#play-btn,
.menu-icon-btn,
.icon-btn,
button,
input,
.color-swatch,
.skin-item {
    pointer-events: auto !important;
    cursor: pointer !important;
}

#main-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 30%, #1a1640 0%, #0d0b1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
    pointer-events: auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 90px 20px 40px;
    box-sizing: border-box;
}

#main-menu>* {
    position: relative;
    z-index: 1;
}

#menu-top-area {
    position: absolute;
    top: 30px;
    left: 20px;
    width: calc(100% - 40px);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
}

#menu-profile-badge {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 99px;
    padding: 4px;
    padding-right: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

#menu-top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.small-btn {
    padding: 10px !important;
    border-radius: 50% !important;
}

#menu-gold-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 16px;
    font-weight: 900;
    color: #f1c40f;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#menu-logo-area {
    position: relative;
    top: 0;
    margin-top: auto;
    z-index: 5;
    pointer-events: none;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
}

.modern-logo-title {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    animation: titleFloat 3.5s ease-in-out infinite alternate;
}

.logo-text-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

@keyframes titleFloat {
    0% {
        transform: translateY(0px) scale(1);
    }
    100% {
        transform: translateY(-6px) scale(1.02);
    }
}

.title-part {
    font-family: 'Kanit', sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: 52px;
    line-height: 0.8;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    padding-bottom: 0;
}

.snake-part {
    background: linear-gradient(135deg, #ffffff 0%, #00ff87 40%, #00d2d3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 25px rgba(0, 255, 135, 0.6)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.9));
}

.area-part {
    background: linear-gradient(135deg, #ffffff 0%, #ffbe1a 35%, #ff4757 80%, #ff1f5a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 25px rgba(255, 71, 87, 0.6)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.9));
}

.logo-bottom-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: -6px;
}

.bar-line {
    flex: 1;
    height: 2.5px;
    border-radius: 2px;
}

.bar-line.line-l {
    background: linear-gradient(90deg, transparent, #00ff87);
}

.bar-line.line-r {
    background: linear-gradient(90deg, #ff4757, transparent);
}

.bar-dot {
    width: 7px;
    height: 7px;
    background: #ffffff;
    border-radius: 1.5px;
    transform: rotate(45deg);
    box-shadow: 0 0 8px #ffffff, 0 0 16px #00ff87;
}

#char-preview-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 180px;
    margin: 0;
}

.char-pedestal {
    position: absolute;
    width: 250px;
    max-width: 80%;
    height: 60px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.15) 0%, transparent 70%);
    bottom: 20px;
    border-radius: 50%;
    filter: blur(10px);
}

#char-preview {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: transparent !important;
    z-index: 2;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

#nickname {
    background: transparent;
    border: none;
    color: white;
    padding: 0;
    font-size: 16px;
    font-weight: 800;
    width: 80px;
    letter-spacing: 1px;
}

#nickname:focus {
    outline: none;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
}

#menu-bottom-area {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 10;
    margin-bottom: auto;
}

#play-btn {
    width: 100%;
    flex: 1;
    max-width: 280px;
    padding: 16px 30px;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: 99px;
    background: linear-gradient(180deg, #f1c40f 0%, #e67e22 100%);
    border: 3px solid #f39c12;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 35px rgba(230, 126, 34, 0.5), inset 0 4px 0 rgba(255, 255, 255, 0.4), inset 0 -6px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    margin: 0;
}

#play-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
    animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    30%,
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

#play-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 45px rgba(230, 126, 34, 0.6), inset 0 4px 0 rgba(255, 255, 255, 0.5), inset 0 -6px 0 rgba(0, 0, 0, 0.2);
}

#play-btn:active {
    transform: translateY(2px) scale(0.96);
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.market-btn-float {
    position: relative !important;
    left: auto;
    bottom: auto;
    width: 75px;
    height: 75px;
    padding: 0 !important;
    border-radius: 25px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 16px 28px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    color: white;
    font-family: inherit;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.menu-icon-btn span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

.menu-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.menu-icon-btn:active {
    transform: translateY(0) scale(0.95);
}

.menu-icon-btn:hover span {
    opacity: 1;
}

#settings-modal,
#confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 8, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 400;
    transition: opacity 0.3s ease;
    padding: 15px;
    box-sizing: border-box;
    overflow-y: auto;
}

#confirm-modal {
    z-index: 500;
}

#skin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 30%, #1a1640 0%, #0d0b1a 100%);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    z-index: 300;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.market-top-bar {
    position: sticky;
    top: 0;
    z-index: 99;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 769px) {
    .market-top-bar {
        padding: 10px 24px;
    }
}

.market-top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.market-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: none !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.market-back-btn svg {
    width: 18px !important;
    height: 18px !important;
}

.market-back-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.market-bottom-nav {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 420px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px; 
    background: rgba(15, 12, 30, 0.85); 
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 8px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.05);
    z-index: 100;
}

.market-bottom-nav .market-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    position: relative;
}

.market-bottom-nav .market-tab-btn span {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    height: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

.market-bottom-nav .market-tab-btn svg {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    width: 22px;
    height: 22px;
}

.market-bottom-nav .market-tab-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.market-bottom-nav .market-tab-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    flex: 1.4; 
    padding: 10px 0;
}

.market-bottom-nav .market-tab-btn.active span {
    opacity: 1;
    height: 12px;
    transform: translateY(0);
    margin-top: 4px;
}

.market-bottom-nav .market-tab-btn.active svg {
    transform: translateY(-2px);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.market-gold-container {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(241, 196, 15, 0.15);
    border: 1.5px solid rgba(241, 196, 15, 0.3);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 900;
    color: #f1c40f;
    white-space: nowrap;
    flex-shrink: 0;
}

.market-gold-container svg {
    width: 18px !important;
    height: 18px !important;
}

.market-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px 0px; 
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.market-content::after {
    content: '';
    display: block;
    height: 160px;
    width: 100%;
    flex-shrink: 0;
}

.market-section {
    display: none;
    width: 100%;
    margin-bottom: 40px;
    padding: 10px;
    box-sizing: border-box;
}

.market-section.active-section {
    display: block;
    animation: fadeSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.25) forwards;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.market-subtitle {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-align: left;
    text-transform: uppercase;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.5) 0%, transparent 80%);
    padding: 12px 20px;
    border-left: 5px solid #3498db;
    border-radius: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    width: 100%;
    box-sizing: border-box;
}

.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.market-skin-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}

.market-skin-grid .skin-item {
    padding: 25px 15px;
}

.market-skin-grid .skin-emoji {
    font-size: 48px;
    margin-bottom: 10px;
}

.market-skin-grid .skin-item span {
    font-size: 14px;
}

.hidden,
#settings-modal.hidden,
#skin-modal.hidden,
#confirm-modal.hidden,
#main-menu.hidden,
#game-over.hidden,
#hud.hidden,
#minimap-container.hidden,
#leaderboard.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

.settings-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 16px 16px 12px;
    width: 90%;
    max-width: 400px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    animation: popInFlex 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    position: relative;
}

@media (min-width: 768px) {
    .settings-content {
        max-width: 600px;
        padding: 30px 40px;
    }
}

@keyframes popInFlex {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.settings-content h2 {
    font-size: 22px;
    font-weight: 900;
    color: #f1c40f;
    margin-bottom: 12px;
    margin-top: 0;
    letter-spacing: 2px;
}

.settings-section {
    margin-bottom: 14px;
}

.settings-section h3 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    margin-bottom: 6px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.settings-option,
.theme-option,
.vibration-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 600;
}
    transition: all 0.2s ease;
}

.settings-option:hover,
.vibration-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.settings-option span,
.vibration-option span {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.settings-option.active,
.vibration-option.active {
    background: rgba(52, 152, 219, 0.15);
    border-color: #3498db;
}

.settings-option.active span,
.vibration-option.active span {
    color: white;
}

.radio-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.settings-option.active .radio-circle,
.vibration-option.active .radio-circle {
    border-color: #3498db;
    background: #3498db;
}

.settings-option.active .radio-circle::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    animation: checkAnim 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes checkAnim {
    0% {
        height: 0;
        width: 0;
        opacity: 0;
    }

    50% {
        height: 0;
        width: 5px;
        opacity: 1;
    }

    100% {
        height: 10px;
        width: 5px;
        opacity: 1;
    }
}

.close-settings-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white;
    box-shadow: none !important;
    margin-top: 5px;
    padding: 12px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
}

.close-settings-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
}

.skin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.skin-item {
    position: relative;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px 10px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    overflow: visible;
}

.skin-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.skin-item.active {
    border-color: #00cec9;
    box-shadow: 0 0 20px rgba(0, 206, 201, 0.4), inset 0 0 15px rgba(0, 206, 201, 0.2);
    transform: scale(1.05);
}

.skin-item[data-rarity="common"] {
    border-color: #bdc3c7;
}

.skin-item[data-rarity="rare"] {
    border-color: #9b59b6;
    background: linear-gradient(180deg, rgba(155, 89, 182, 0.25) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.skin-item[data-rarity="legendary"] {
    border-color: #f1c40f;
    background: linear-gradient(180deg, rgba(241, 196, 15, 0.25) 0%, rgba(15, 23, 42, 0.9) 100%);
    animation: legendaryPulse 2s infinite ease-in-out;
}

@keyframes legendaryPulse {
    0% { box-shadow: 0 0 15px rgba(241, 196, 15, 0.3), inset 0 0 10px rgba(241, 196, 15, 0.1); }
    50% { box-shadow: 0 0 30px rgba(241, 196, 15, 0.7), inset 0 0 20px rgba(241, 196, 15, 0.3); }
    100% { box-shadow: 0 0 15px rgba(241, 196, 15, 0.3), inset 0 0 10px rgba(241, 196, 15, 0.1); }
}

.skin-emoji {
    font-size: 56px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.skin-item img {
    width: 64px !important;
    height: 64px !important;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.skin-item:hover .skin-emoji,
.skin-item:hover img {
    transform: scale(1.1);
}

.skin-item span {
    font-size: 14px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.picker-section {
    margin-bottom: 20px;
    text-align: left;
}

.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px 18px;
    justify-content: flex-start;
    padding: 10px 0;
}

.color-swatch {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 -5px 10px rgba(0,0,0,0.3), inset 0 5px 10px rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.color-swatch:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6), inset 0 -5px 10px rgba(0,0,0,0.3), inset 0 5px 10px rgba(255,255,255,0.5);
    border-color: rgba(255, 255, 255, 0.6);
}

.color-swatch.selected {
    border-color: #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8), 0 0 15px currentColor, inset 0 -5px 10px rgba(0,0,0,0.3), inset 0 5px 10px rgba(255,255,255,0.6);
    transform: scale(1.15);
}

.color-swatch.item-locked {
    opacity: 1 !important;
    filter: none !important;
}

.color-swatch .price-tag {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #f1c40f;
    font-size: 11px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1.5px solid #f1c40f;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 3px;
}

.item-locked {
    opacity: 0.7;
}

.item-locked .skin-emoji,
.item-locked .territory-preview,
.item-locked > span {
    filter: grayscale(100%);
    opacity: 0.5;
}

.price-tag {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #f1c40f;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid #f1c40f;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 3px;
}

.skin-item .price-tag {
    bottom: -10px;
}

.theme-picker {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.theme-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.theme-btn.active {
    background: white;
    color: #131124;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(19, 17, 36, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 16px 22px;
    border-radius: 16px;
    min-width: 170px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: slideInLeft 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hud h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #f1c40f;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 900;
}

.hud-item {
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
}

.hud-item span {
    color: #3498db;
    font-size: 16px;
    font-weight: 800;
}

.hud-item-small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.hud-item-small span {
    color: #e74c3c;
    font-weight: 800;
}

#leaderboard {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.lb-item {
    background: rgba(19, 17, 36, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    min-width: 190px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.lb-item.me {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(19, 17, 36, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 40px 50px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    z-index: 100;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 90%;
    max-width: 400px;
    color: white;
}

@keyframes popIn {
    from {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

#game-over h1 {
    margin: 0 0 15px 0;
    font-size: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 900;
    color: #e74c3c;
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.3);
}

#game-over p {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

#game-over p span {
    font-weight: 800;
    color: #f1c40f;
}

#game-over button {
    width: 100%;
    margin-top: 15px;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    margin-top: 10px !important;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}

button {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.5);
    filter: brightness(1.1);
}

button:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

#minimap-container {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 160px;
    height: 160px;
    background: rgba(15, 12, 27, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.5),
        inset 0 0 25px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(52, 152, 219, 0.2);
    overflow: hidden;
    pointer-events: auto;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: slideInUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    z-index: 50;
}

#minimap-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

.minimap-v-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

#minimap {
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    position: relative;
    z-index: 1;
    transform: scale(1.02);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    #main-menu {
        padding: 20px 15px 30px;
        justify-content: flex-start;
        gap: 20px;
    }

    #menu-top-area {
        flex-wrap: wrap;
        gap: 10px;
    }

    #menu-top-right {
        flex-direction: row;
        align-items: center;
    }

    .menu-title {
        font-size: 24px;
        margin-top: 5px;
    }

    #play-btn {
        padding: 16px 20px;
        font-size: 22px;
    }

    .market-btn-float {
        width: 65px;
        height: 65px;
    }

    #game-over {
        padding: 30px;
    }

    .hud {
        top: 10px;
        left: 10px;
        padding: 10px 15px;
        min-width: 140px;
    }

    #leaderboard {
        top: 10px;
        right: 10px;
    }

    .lb-item {
        min-width: 150px;
        font-size: 11px;
        padding: 6px 12px;
    }

    .settings-content {
        padding: 20px 15px;
        width: 95%;
    }

    .settings-content h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .settings-option {
        padding: 12px 12px;
    }

    .settings-option span {
        font-size: 11px;
        text-align: left;
    }

    .radio-circle {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        margin-left: 10px;
    }

    .market-content {
        padding: 15px 10px 100px;
        width: 100%;
        box-sizing: border-box;
    }

    .market-top-bar {
        padding: 12px 15px;
    }

    .market-back-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .market-back-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    .market-gold-container {
        padding: 6px 10px;
        font-size: 12px;
    }

    .market-gold-container svg {
        width: 16px !important;
        height: 16px !important;
    }

    .market-title {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .market-section {
        padding: 15px;
        margin-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .market-subtitle {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .color-grid {
        justify-content: center;
        gap: 10px;
    }

    .color-swatch {
        width: 35px;
        height: 35px;
    }

    .market-skin-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100%;
    }

    .market-skin-grid .skin-emoji {
        font-size: 32px;
    }

    .market-skin-grid .skin-item {
        padding: 12px 8px;
    }

    .market-skin-grid .skin-item img {
        width: 40px;
        height: 40px;
    }

    .market-skin-grid .skin-item span {
        font-size: 11px !important;
    }
}

@keyframes burn {
    0% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(1.1) translateY(-2px);
    }

    100% {
        transform: scaleY(1);
    }
}

.fire-svg {
    animation: burn 0.8s infinite ease-in-out;
    transform-origin: bottom center;
    filter: drop-shadow(0 0 10px #ff5500);
}

.theme-option,
.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.theme-option:hover,
.settings-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-option.active,
.settings-option.active {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.2);
}

.theme-option .radio-circle,
.settings-option .radio-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.theme-option.active .radio-circle,
.settings-option.active .radio-circle {
    border-color: #3498db;
    background: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.6);
}

.territory-preview {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin: 0 auto 6px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.skin-item:hover .territory-preview {
    transform: scale(1.1);
}

.tp-classic {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    border: 3px solid #f39c12;
}

.tp-flame {
    background: linear-gradient(135deg, #78281f, #c0392b);
    border: 3px solid #d35400;
}

.tp-lava {
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(45deg, rgba(243, 156, 18, 0.5) 0px, rgba(243, 156, 18, 0.5) 4px, transparent 4px, transparent 10px);
}

.tp-rainbow {
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff);
    border: 3px solid #ff79a8;
}

.tp-gold {
    background: #f1c40f url('gold_coin.png') repeat center / 20px 20px;
    border: 3px solid #f1c40f;
}

.tp-ice {
    background: linear-gradient(180deg, #00c6ff, #0072ff);
    border: 3px solid #00c6ff;
}

.tp-waves {
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.4) 0px, rgba(255, 255, 255, 0.4) 3px, transparent 3px, transparent 8px);
}

.tp-neon {
    background: #0a0a14;
    border: 3px solid #00ffcc;
}

.tp-grid {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(0, 255, 204, 0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 204, 0.5) 1px, transparent 1px);
    background-size: 10px 10px;
}

.tp-korean {
    background: url('korean_text.jpg') repeat center / cover;
    border: 3px solid #d4af37;
}

.tp-sun {
    background: #ffeaa7 url('skin_sun.png') repeat center / 20px 20px;
    border: 3px solid #fdcb6e;
}

.tp-rainbow-item {
    background: #fab1a0 url('skin_rainbow.png') repeat center / 20px 20px;
    border: 3px solid #ff7675;
}

.tp-cloud {
    background: #81ecec url('skin_cloud.png') repeat center / 20px 20px;
    border: 3px solid #74b9ff;
}

.tp-mars {
    background: url('mars_texture.png') repeat center / cover;
    border: 3px solid #e74c3c;
}

.tp-moon {
    background: url('moon_texture.png') repeat center / cover;
    border: 3px solid #b2bec3;
}

.trail-preview {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin: 0 auto 6px auto;
    background: #0f172a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.skin-item:hover .trail-preview {
    transform: scale(1.1);
}

.trail-preview::before {
    content: '';
    position: absolute;
    width: 32px;
    height: 10px;
    border-radius: 6px;
    transform: rotate(-35deg);
}

.trp-classic::before {
    background: #f1c40f;
    box-shadow: 0 0 10px #f1c40f;
}

.trp-flame::before {
    background: linear-gradient(90deg, #ff0000, #ff8800, #ffee00);
    box-shadow: 0 0 12px #ff5500;
}

.trp-rainbow::before {
    background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #ff00ff);
    box-shadow: 0 0 12px #00ffff;
}

.trp-gold::before {
    background: #f39c12;
    box-shadow: 0 0 12px #f1c40f;
}

.trp-ice::before {
    background: #54a0ff;
    box-shadow: 0 0 12px #00d2d3;
}

.trp-neon::before {
    background: #00ffcc;
    box-shadow: 0 0 14px #00ffcc;
}

.trp-korean::before {
    background: #d4af37;
    box-shadow: 0 0 10px #d4af37;
}

.trp-sun::before {
    background: #fdcb6e;
    box-shadow: 0 0 10px #fdcb6e;
}

.trp-rainbow-item::before {
    background: #ff7675;
    box-shadow: 0 0 10px #ff7675;
}

.trp-cloud::before {
    background: #74b9ff;
    box-shadow: 0 0 10px #74b9ff;
}

.trp-icons {
    position: absolute;
    display: flex;
    gap: 3px;
    transform: rotate(-35deg);
    z-index: 2;
}

@media (min-width: 769px) {
    .market-top-bar {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 20px;
    }

    .desktop-only-nav {
        display: flex !important;
    }

    .mobile-sub-bar {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only-nav {
        display: none !important;
    }

    .mobile-sub-bar {
        display: flex !important;
        margin-top: 4px;
        padding: 3px;
        gap: 2px;
    }

    .market-top-bar {
        padding: 8px 12px;
        gap: 6px;
    }

    .market-category-bar .market-tab-btn {
        padding: 6px 3px;
        font-size: 11px;
        flex: 1;
        justify-content: center;
        gap: 3px;
    }

    .market-category-bar .market-tab-btn svg {
        width: 14px;
        height: 14px;
    }

    .market-content {
        padding: 10px 10px;
    }

    .market-title {
        font-size: 26px;
        margin-bottom: 14px;
    }

    .market-section {
        padding: 14px 10px;
        margin-bottom: 20px;
        scroll-margin-top: 100px;
    }

    .color-swatch {
        width: 42px;
        height: 42px;
    }

    .color-grid {
        gap: 14px 10px;
        justify-content: center;
    }

    .market-skin-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 10px;
    }

    .market-skin-grid .skin-item {
        padding: 12px 6px;
    }
}

.skin-item[data-rarity="common"] {
    border: 2px solid rgba(189, 195, 199, 0.3);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.25) 100%);
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.3);
}

.skin-item[data-rarity="common"]::after {
    content: var(--common-text, "YAYGIN");
    position: absolute;
    top: 0px;
    left: 0px;
    background: linear-gradient(180deg, #95a5a6, #7f8c8d);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 11px 0 10px 0;
    letter-spacing: 1px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid #576574;
    border-right: 2px solid #576574;
}

.skin-item[data-rarity="common"]:hover {
    border-color: rgba(189, 195, 199, 0.7);
    box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.2), 0 6px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.skin-item[data-rarity="common"].active {
    border-color: #bdc3c7;
    background: linear-gradient(180deg, rgba(189, 195, 199, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
    box-shadow: 0 0 15px rgba(189, 195, 199, 0.5), inset 0 0 10px rgba(189, 195, 199, 0.3);
}

.skin-item[data-rarity="rare"] {
    border: 2px solid rgba(52, 152, 219, 0.6);
    background: linear-gradient(180deg, rgba(41, 128, 185, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
    box-shadow: inset 0 2px 10px rgba(52, 152, 219, 0.4), 0 4px 8px rgba(0, 0, 0, 0.4);
}

.skin-item[data-rarity="rare"]::after {
    content: var(--rare-text, "NADİR");
    position: absolute;
    top: 0px;
    left: 0px;
    background: linear-gradient(180deg, #3498db, #2980b9);
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 11px 0 10px 0;
    letter-spacing: 1.5px;
    box-shadow: 2px 2px 8px rgba(41, 128, 185, 0.7);
    z-index: 5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    border-bottom: 2px solid #1a5276;
    border-right: 2px solid #1a5276;
}

.skin-item[data-rarity="rare"]:hover {
    border-color: #3498db;
    box-shadow: inset 0 2px 15px rgba(52, 152, 219, 0.6), 0 8px 15px rgba(52, 152, 219, 0.4);
    transform: translateY(-4px) scale(1.03);
}

.skin-item[data-rarity="rare"].active {
    border-color: #00e5ff;
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.25) 0%, rgba(0, 0, 0, 0.5) 100%);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.6), inset 0 0 15px rgba(0, 229, 255, 0.4);
    animation: rarePulse 2s infinite alternate;
}

@keyframes rarePulse {
    0% {
        box-shadow: 0 0 15px rgba(52, 152, 219, 0.6), inset 0 0 10px rgba(52, 152, 219, 0.4);
    }

    100% {
        box-shadow: 0 0 25px rgba(0, 229, 255, 0.8), inset 0 0 20px rgba(0, 229, 255, 0.5);
    }
}

.skin-item[data-rarity="legendary"] {
    border: 2px solid transparent;
    background: linear-gradient(180deg, #2a1640 0%, #0d0b1a 100%) padding-box,
        linear-gradient(135deg, #f1c40f, #e67e22, #e74c3c, #9b59b6, #f1c40f) border-box;
    background-size: 100% 100%, 200% 200%;
    animation: legendaryBorder 3s linear infinite;
    position: relative;
    box-shadow: inset 0 2px 15px rgba(241, 196, 15, 0.3), 0 5px 12px rgba(0, 0, 0, 0.6);
}

.skin-item[data-rarity="legendary"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(241, 196, 15, 0.4) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.skin-item[data-rarity="legendary"]::after {
    content: var(--legendary-text, "EFSANEVİ");
    position: absolute;
    top: 0px;
    left: 0px;
    background: linear-gradient(180deg, #f1c40f, #e67e22);
    color: #fff;
    font-size: 8.5px;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 11px 0 10px 0;
    letter-spacing: 1.5px;
    box-shadow: 2px 2px 10px rgba(230, 126, 34, 0.8);
    z-index: 5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #b9770e;
    border-right: 2px solid #b9770e;
}

@keyframes legendaryBorder {
    0% {
        background-position: 0% 0%, 0% 50%;
    }

    50% {
        background-position: 0% 0%, 100% 50%;
    }

    100% {
        background-position: 0% 0%, 0% 50%;
    }
}

.skin-item[data-rarity="legendary"]:hover {
    box-shadow: 0 10px 30px rgba(241, 196, 15, 0.6), inset 0 2px 20px rgba(241, 196, 15, 0.5);
    transform: translateY(-5px) scale(1.04);
}

.skin-item[data-rarity="legendary"].active {
    background: linear-gradient(180deg, rgba(241, 196, 15, 0.3) 0%, rgba(13, 11, 26, 0.9) 100%) padding-box,
        linear-gradient(135deg, #f1c40f, #e67e22, #e74c3c, #9b59b6, #f1c40f) border-box;
    background-size: 100% 100%, 200% 200%;
    box-shadow: 0 0 40px rgba(241, 196, 15, 0.8), inset 0 0 25px rgba(241, 196, 15, 0.5);
}

#notifications-container {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 1000;
}

.notification-item {
    margin-top: 10px;
    padding: 8px 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: white;
    border-radius: 30px; 
    background: rgba(15, 12, 31, 0.85); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0,0,0,0.2);
    animation: modernPopAndFade 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; 
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.notification-item > * {

}

.notification-item.area {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px rgba(46, 204, 113, 0.4);
    border: 1px solid rgba(46, 204, 113, 0.5);
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.8), rgba(46, 204, 113, 0.6));
}

.notification-item.kill {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px rgba(231, 76, 60, 0.4);
    border: 1px solid rgba(231, 76, 60, 0.5);
    background: linear-gradient(135deg, rgba(192, 57, 43, 0.8), rgba(231, 76, 60, 0.6));
    font-size: 18px; 
}

.kill-icon {
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    display: inline-block;
    animation: iconPulse 1s infinite alternate ease-in-out;
}

@keyframes iconPulse {
    0% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
    100% { transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(255,255,255,0.4)); }
}

@keyframes modernPopAndFade {
    0% { opacity: 0; transform: translateY(20px) scale(0.8); }
    15% { opacity: 1; transform: translateY(0px) scale(1.05); }
    25% { transform: translateY(0px) scale(1); }
    75% { opacity: 1; transform: translateY(0px) scale(1); }
    100% { opacity: 0; transform: translateY(-30px) scale(0.9); }
}

.item-locked img,
.item-locked .skin-emoji,
.color-swatch.item-locked {
    filter: grayscale(100%);
    opacity: 0.4;
    transition: all 0.3s ease;
}
.skin-item.item-locked:hover img,
.skin-item.item-locked:hover .skin-emoji {
    filter: grayscale(80%);
    opacity: 0.6;
}

@media (min-width: 768px) {
    .title-part {
        font-size: 64px;
    }
    .modern-logo-title {
        gap: 16px;
    }
    #char-preview-wrapper {
        min-height: 280px;
    }
    .char-pedestal {
        width: 380px;
        height: 80px;
        bottom: 10px;
    }
    #char-preview {
        max-width: 320px;
    }
    #play-btn {
        max-width: 360px;
        padding: 24px 40px;
        font-size: 32px;
    }
    .market-btn-float {
        width: 100px;
        height: 100px;
        border-radius: 30px !important;
    }
    .market-btn-float svg {
        width: 36px !important;
        height: 36px !important;
    }
    .market-btn-float span {
        font-size: 16px;
    }
    #menu-bottom-area {
        gap: 25px;
    }
}

@media (max-height: 650px) {
    #main-menu {
        padding-top: 80px;
        gap: 2vh;
        justify-content: center;
    }
    .title-part {
        font-size: 34px;
    }
    .modern-logo-title {
        gap: 8px;
    }
    #char-preview-wrapper {
        min-height: 150px;
    }
    #char-preview {
        max-width: 190px;
    }
    #menu-top-area {
        top: 20px;
    }
}

@media (max-width: 480px) {
    .title-part {
        font-size: 38px;
    }
    .modern-logo-title {
        gap: 8px;
    }
    #char-preview-wrapper {
        min-height: 220px;
    }
    #char-preview {
        max-width: 250px;
    }
    #menu-bottom-area {
        flex-direction: column;
        gap: 12px;
        margin-top: 4vh;
        width: 100%;
        max-width: 280px;
    }
    #play-btn {
        order: -1;
        width: 100%;
        max-width: 100%;
        font-size: 24px;
        padding: 16px 20px;
    }
    .market-btn-float {
        order: 1;
        width: 100% !important;
        height: auto !important;
        flex-direction: row !important;
        border-radius: 99px !important;
        padding: 14px 20px !important;
        justify-content: center;
        gap: 8px;
    }
    .market-btn-float svg {
        width: 24px !important;
        height: 24px !important;
    }
    .market-btn-float span {
        font-size: 16px !important;
        font-weight: 800;
        letter-spacing: 1px;
    }
}

/* --- LANDSCAPE MOBILE RESPONSIVENESS --- */
@media (orientation: landscape) and (max-height: 500px) {
    #minimap-container {
        width: 100px;
        height: 100px;
        bottom: 15px;
        left: 15px;
    }
    #leaderboard {
        top: 15px;
        right: 15px;
        transform: scale(0.65);
        transform-origin: top right;
    }
    #hud {
        top: 15px;
        left: 15px;
        transform: scale(0.7);
        transform-origin: top left;
    }
    #notifications-container {
        top: 25px;
    }
}
