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

/* Hide scrollbar for all browsers */
body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


body {
    font-family: 'Garamond', 'Georgia', serif;
    background: linear-gradient(135deg, #2a2135 0%, var(--obsidian) 100%);
    min-height: 100vh;
    color: var(--body-text);
    text-shadow: 0 1px 2px #000a;
    overflow-x: hidden;
    position: relative;
}

/* Remove old body::before and add new magical particles */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(4px circle at 20% 20%, var(--electrum) 100%, transparent),
        radial-gradient(6px circle at 75% 75%, var(--violet) 100%, transparent),
        radial-gradient(3px circle at 50% 50%, var(--header-gold) 100%, transparent),
        radial-gradient(5px circle at 85% 15%, var(--violet) 100%, transparent),
        radial-gradient(4px circle at 10% 85%, var(--electrum) 100%, transparent),
        radial-gradient(6px circle at 60% 40%, var(--header-gold) 100%, transparent);
    filter: blur(1px);
    opacity: 0.3;
    z-index: -1;
    animation: floatingParticles 8s ease-in-out infinite;
}

@keyframes floatingParticles {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(10px, -10px) scale(1.05);
    }
    50% {
        transform: translate(-5px, 15px) scale(0.95);
    }
    75% {
        transform: translate(-10px, -5px) scale(1.02);
    }
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(8px circle at 40% 60%, var(--electrum) 100%, transparent),
        radial-gradient(12px circle at 85% 35%, var(--violet) 100%, transparent),
        radial-gradient(6px circle at 15% 25%, var(--header-gold) 100%, transparent),
        radial-gradient(10px circle at 65% 85%, var(--electrum) 100%, transparent);
    filter: blur(2px);
    opacity: 0.2;
    z-index: -1;
    animation: floatingParticlesSlow 12s ease-in-out infinite;
}

@keyframes floatingParticlesSlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-15px, 10px) scale(1.1);
    }
    66% {
        transform: translate(15px, -15px) scale(0.9);
    }
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

header::before {
    display: none;
}

@keyframes headerShine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.shop-navigation {
    display: flex;
    justify-content: center;
    gap: 0;
    background: linear-gradient(90deg, var(--obsidian) 80%, #6d4e9c22 100%);
    border-bottom: 2px solid var(--violet);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 2px 12px 0 #0008;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 2;
}

.nav-btn {
    background: transparent;
    color: var(--header-gold);
    border: none;
    border-right: 1px solid var(--violet);
    border-radius: 0;
    padding: 18px 18px 14px 32px;
    font-size: 1.5sem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Cinzel Decorative', 'Garamond', serif;
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
    position: relative;
    text-shadow: 0 0 8px var(--header-gold), 0 0 2px var(--violet);
    box-shadow: none;
    outline: none;
}

.nav-btn:last-child {
    border-right: none;
}

.nav-btn::after {
    content: '';
    display: block;
    margin: 0 auto;
    margin-top: 8px;
    width: 0%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--electrum), var(--violet));
    box-shadow: 0 0 8px var(--electrum);
    transition: width 0.3s cubic-bezier(.4,0,.2,1);
}

.nav-btn:hover, .nav-btn.active {
    color: var(--electrum);
    background: linear-gradient(90deg, #23232a 80%, #6d4e9c22 100%);
    text-shadow: 0 0 12px var(--electrum), 0 0 4px var(--violet);
}

.nav-btn:hover::after, .nav-btn.active::after {
    width: 80%;
}

.currency-counter {
    width: 100%;
    padding: 18px 10px;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(120deg, var(--obsidian) 70%, #6d4e9c22 100%);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 2px solid var(--electrum);
    box-shadow: 0 6px 24px 0 #000a, 0 0 12px var(--electrum);
}

.currency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.currency-type {
    color: var(--violet);
    font-size: 1.08em;
    font-family: 'Cinzel Decorative', 'Garamond', serif;
    letter-spacing: 1px;
    text-shadow: 0 0 8px var(--violet);
}

.currency-value {
    color: var(--electrum);
    font-size: 1.4em;
    font-family: 'Cinzel Decorative', 'Garamond', serif;
    font-weight: bold;
    text-shadow: 0 0 10px var(--electrum), 0 0 4px var(--violet);
    letter-spacing: 1px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    padding: 2px 12px;
}

/* Animated Torch Flicker Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(180, 120, 50, 0.2) 0%, transparent 25%),
        radial-gradient(circle at 80% 20%, rgba(180, 120, 50, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 40% 70%, rgba(180, 120, 50, 0.1) 0%, transparent 25%);
    pointer-events: none;
    z-index: -1;
    animation: torchFlicker 8s infinite alternate;
    opacity: 0.7;
}

@keyframes torchFlicker {

    0%,
    100% {
        opacity: 0.7;
    }

    25% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.6;
    }

    75% {
        opacity: 0.75;
    }
}

/* Animated Parchment Background */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 100% 100%, rgba(139, 69, 19, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 0% 0%, rgba(139, 69, 19, 0.1) 0%, transparent 20%),
        linear-gradient(rgba(80, 50, 20, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(80, 50, 20, 0.1) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 20px 20px, 20px 20px;
    background-position: 0 0, 0 0, 0 0, 0 0;
    pointer-events: none;
    z-index: -1;
    animation: parchmentMove 120s infinite linear;
}

@keyframes parchmentMove {
    from {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }

    to {
        background-position: 0 0, 0 0, 20px 20px, 20px 20px;
    }
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

header::before {
    display: none;
}

@keyframes headerShine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.shop-navigation {
    padding: 15px 20px;
    margin: 0;
    background: rgba(20, 15, 10, 0.6);
    /* border: none; */
    /* border-bottom: 1px solid rgba(184, 160, 112, 0.3); */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    gap: 5px;
}

.shop-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 20px;
    background: rgba(35, 27, 18, 0.6);
    border-radius: 8px;
    /* border: 2px solid #6b5c43; */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    position: relative;
}

.nav-btn {
    background: rgba(35, 27, 18, 0.6);
    color: #d6c6a5;
    border: 1px solid rgba(184, 160, 112, 0.3);
    padding: 10px 20px;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184, 160, 112, 0.2), transparent);
    transition: 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    background: rgba(184, 160, 112, 0.15);
    border-color: rgba(184, 160, 112, 0.5);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: rgba(184, 160, 112, 0.2);
    border-color: rgba(184, 160, 112, 0.6);
    color: #ffedc2;
    box-shadow: 
        0 0 15px rgba(184, 160, 112, 0.2),
        inset 0 0 5px rgba(184, 160, 112, 0.2);
}

.shop-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 18px 18px 24px 24px;
    border: 2px solid var(--violet);
    box-shadow: 0 8px 32px 0 #000a, 0 0 24px 0 var(--violet);
    position: relative;
    overflow: hidden;
}

.shop-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(35, 27, 18, 0.4) 0%, transparent 20%, transparent 80%, rgba(35, 27, 18, 0.4) 100%),
        url("data:image/svg+xml,%3Csvg width='300' height='300' viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='150' cy='150' r='120' fill='none' stroke='%236d4e9c' stroke-width='4' opacity='0.18'/%3E%3Ccircle cx='150' cy='150' r='80' fill='none' stroke='%23e6c86e' stroke-width='2' opacity='0.12'/%3E%3Cpath d='M150 30 L170 270 M30 150 L270 150' stroke='%23ffe9a5' stroke-width='1' opacity='0.08'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.shop-header h2 {
    margin: 25px 0 15px;
    color: #ffedc2;
    font-size: 2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
}

.shop-header p {
    color: #b8a070;
    font-style: italic;
    padding: 0 20px 20px;
    opacity: 0.9;
}

h1 {
    font-size: 3em;
    color: #d6c6a5;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #b8a070, transparent);
    animation: titleUnderline 3s infinite;
}

@keyframes titleUnderline {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.subtitle {
    font-size: 1.2em;
    color: #b8a070;
    font-style: italic;
    
}

.currency-counter {
    width: 100%;
    padding: 15px;
    margin: 0;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    align-items: center; /* Center items vertically */
    justify-content: center;
    background: rgba(35, 27, 18, 0.9);
    border-radius: 8px;
    border: 2px solid #8a7850;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.currency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center content vertically */
    gap: 8px;
}

.currency-type {
    color: #b8a070;
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 1px;
}

.currency-value {
    color: #d6c6a5;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.currency-input-section {
    margin: 20px 0;
}

.currency-input-group {
    margin-bottom: 15px;
}

.currency-input-group label {
    display: block;
    color: #d6c6a5;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.currency-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #6b5c43;
    border-radius: 6px;
    background: rgba(35, 27, 18, 0.8);
    color: #e0d5c0;
    font-size: 1.1em;
    font-family: inherit;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.currency-input:focus {
    outline: none;
    border-color: #b8a070;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(184, 160, 112, 0.3);
    transform: translateY(-2px);
}

.currency-note {
    text-align: center;
    margin: 15px 0;
    color: #b8a070;
    font-style: italic;
}

.payment-section {
    background: rgba(35, 27, 18, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #6b5c43;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.payment-title {
    color: #d6c6a5;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.price-breakdown {
    margin-bottom: 15px;
    line-height: 1.5;
}

.price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: #e0d5c0;
    transition: all 0.3s ease;
}

.price-line:hover {
    color: #d6c6a5;
    text-shadow: 0 0 5px rgba(184, 160, 112, 0.5);
}

.price-line.total {
    border-top: 1px solid #6b5c43;
    padding-top: 5px;
    font-weight: bold;
    color: #d6c6a5;
}

.change-calculator {
    border-top: 2px solid #6b5c43;
    padding-top: 15px;
    margin-top: 15px;
}

.change-title {
    color: #b8a070;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.change-display {
    background: rgba(184, 160, 112, 0.1);
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #8a7850;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.change-line {
    margin-bottom: 5px;
    color: #e0d5c0;
}

.insufficient-funds {
    color: #d66b6b;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background: rgba(214, 107, 107, 0.1);
    border-radius: 5px;
    border-left: 4px solid #8a5043;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulseError 2s infinite;
}

@keyframes pulseError {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.item-card {
    background: linear-gradient(120deg, var(--obsidian) 70%, #6d4e9c22 100%);
    backdrop-filter: blur(10px);
    border: 2px solid var(--electrum);
    border-radius: 14px;
    padding: 24px 18px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 #000a, 0 0 16px var(--violet);
}

.item-card:hover {
    transform: translateY(-5px) rotateX(5deg);
    border-color: #8a7850;
    box-shadow: 0 8px 16px rgba(107, 92, 67, 0.4);
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184, 160, 112, 0.1), transparent);
    transition: left 0.5s;
}

.item-card:hover::before {
    left: 100%;
}

.item-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(184, 160, 112, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover::after {
    opacity: 1;
}

.item-name {
    font-size: 1.4em;
    font-weight: bold;
    color: #d6c6a5;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    display: inline-block;
}

.item-name::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #b8a070;
    transition: width 0.3s ease;
}

.item-card:hover .item-name::after {
    width: 100%;
}

.item-price {
    font-size: 1.2em;
    color: #b8a070;
    margin-bottom: 15px;
    font-weight: bold;
    animation: priceGlow 3s infinite alternate;
}

@keyframes priceGlow {
    0% {
        text-shadow: 0 0 5px rgba(184, 160, 112, 0.3);
    }

    100% {
        text-shadow: 0 0 10px rgba(184, 160, 112, 0.6);
    }
}

.item-rarity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: rarityPulse 4s infinite;
}

@keyframes rarityPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.common {
    background: #6b6868;
    color: #e0d5c0;
}

.uncommon {
    background: #5a7d5a;
    color: #e0d5c0;
    animation-duration: 3s;
}

.rare {
    background: #4a5c8a;
    color: #e0d5c0;
    animation-duration: 2s;
}

.epic {
    background: #6a4a8a;
    color: #e0d5c0;
    animation-duration: 1.5s;
}

.legendary {
    background: #8a6a3a;
    color: #e0d5c0;
    animation-duration: 1s;
}

.item-preview {
    color: #b8a070;
    font-style: italic;
    line-height: 1.4;
}

.modal {
    scrollbar-width: none;
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(120deg, var(--obsidian) 70%, #6d4e9c22 100%);
    backdrop-filter: blur(15px);
    border: 2px solid var(--electrum);
    border-radius: 14px;
    box-shadow: 0 8px 32px 0 #000a, 0 0 16px var(--violet);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}


.close {
    color: #d6c6a5;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.close:hover {
    color: #f4e4bc;
    transform: rotate(90deg);
}

.modal-header {
    border-bottom: 2px solid #6b5c43;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 2em;
    color: #d6c6a5;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.modal-price {
    font-size: 1.5em;
    color: #b8a070;
    font-weight: bold;
}

.modal-description {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e0d5c0;
}

.stats-section {
    background: rgba(35, 27, 18, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #6b5c43;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stats-title {
    color: #d6c6a5;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.buy-btn {
    background: linear-gradient(145deg, #8a7850, #6b5c43);
    color: #1a1208;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.buy-btn:hover::before {
    left: 100%;
}

.buy-btn:hover {
    background: linear-gradient(145deg, #9d8a60, #8a7850);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(107, 92, 67, 0.4);
}

.buy-btn:disabled {
    background: #4a4032;
    color: #6b6868;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    text-shadow: none;
}


.notification {
    position: fixed;
    top: 2vh;
    background-color: rgba(89, 119, 135, 0.9);
    padding: 1.5rem;
    border-radius: 5px;
    z-index: 10000000;
    margin: 0.8rem;

}

.notification:empty {
    visibility: hidden;
}

.notification.success {
    background-color: rgba(63, 104, 83, 0.9);
}

.notification.error {
    background-color: rgba(130, 65, 65, 0.9);
}

#sell-modal .modal-content {
    background: linear-gradient(120deg, var(--obsidian) 70%, #6d4e9c22 100%);
    backdrop-filter: blur(15px);
    border: 2px solid var(--electrum);
    border-radius: 14px;
    box-shadow: 0 8px 32px 0 #000a, 0 0 16px var(--violet);
}

#sell-modal .modal-header {
    border-bottom: 2px solid var(--violet);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#sell-modal .modal-title {
    font-size: 2em;
    color: var(--header-gold);
    margin-bottom: 10px;
    text-shadow: var(--gold-glow), var(--violet-glow);
    font-family: 'Cinzel Decorative', 'Garamond', serif;
}

.sell-input-group {
    background: rgba(10, 10, 12, 0.4);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(109, 78, 156, 0.3);
    margin-bottom: 20px;
    box-shadow: none;
}

.sell-input-group label {
    color: var(--header-gold);
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    text-shadow: 0 0 4px var(--electrum);
}

.sell-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--obsidian);
    border: 2px solid var(--violet);
    border-radius: 6px;
    color: var(--body-text);
    font-size: 1.1em;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 8px #0006;
}

.sell-input:focus {
    outline: none;
    border-color: var(--electrum);
    box-shadow: inset 0 2px 8px #0006, 0 0 10px var(--violet);
    transform: none;
}

/* Prevents the item name input from changing color on focus */
#sell-item-name:focus {
    border-color: var(--violet);
    box-shadow: inset 0 2px 8px #0006;
}

.sell-input::placeholder {
    color: var(--body-muted);
    opacity: 0.7;
}

#sell-modal .modal-description {
    color: var(--body-muted);
    font-style: italic;
    margin: 20px 0;
    text-align: center;
}

/* Shopping Summary Styles */
#summary-modal .modal-content {
    background: linear-gradient(120deg, var(--obsidian) 70%, #6d4e9c22 100%);
    backdrop-filter: blur(15px);
    border: 2px solid var(--electrum);
    border-radius: 14px;
    box-shadow: 0 8px 32px 0 #000a, 0 0 16px var(--violet);
    max-width: 800px;
}

.summary-section {
    background: rgba(24, 24, 27, 0.85);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--violet);
    box-shadow: inset 0 0 15px #000a;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.summary-title {
    font-size: 1.4em;
    color: var(--header-gold);
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--violet);
    text-shadow: var(--gold-glow);
    letter-spacing: 1px;
    font-family: 'Cinzel Decorative', 'Garamond', serif;
}

.summary-list {
    margin-bottom: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(109, 78, 156, 0.2);
    color: var(--body-text);
    transition: all 0.3s ease;
    position: relative;
    border-radius: 6px;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item:hover {
    background: rgba(109, 78, 156, 0.15);
}

.summary-item.clickable-item {
    padding-right: 40px !important;
    justify-content: left;
    gap: 20vw;
}


.summary-item .click-hint {
    position: absolute;
    right: 15px;
    color: var(--body-muted);
    font-size: 0.8em;
    opacity: 0.7;
}

.summary-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--violet);
    color: var(--electrum);
    font-size: 1.2em;
    font-weight: bold;
    text-align: right;
    text-shadow: var(--gold-glow);
}

.currency-summary {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.currency-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(10, 10, 12, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(109, 78, 156, 0.3);
}

.currency-label {
    color: var(--body-muted);
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px #000;
}

.currency-amount {
    color: var(--header-gold);
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: var(--gold-glow);
    letter-spacing: 1px;
}

.final-currency {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--violet);
}

.final-currency .currency-line {
    background: rgba(109, 78, 156, 0.1);
    border: 1px solid var(--violet);
}

.final-currency .currency-label {
    color: var(--header-gold);
    font-size: 1.2em;
}

.final-currency .currency-amount {
    color: var(--electrum);
    font-size: 1.3em;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2em;
    }


    .currency-counter {
    
        text-align: center;
        min-width: 100%;
        max-height: 100%;
        
    }

    .shop-navigation {
        gap: 8px;
        padding: 15px;
    }

    .nav-btn {
        padding: 10px 15px;
        font-size: 0.85em;
    }

    .shop-header h2 {
        font-size: 1.8em;
    }


    .modal-content {

        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }

    /* Reduce animations on mobile for performance */
    .item-card {
        transform: none !important;
    }

    .item-card:hover {
        transform: translateY(-5px) !important;
    }
}

.info-btn {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    width: 200px; /* Fixed width */
    height: fit-content;
}

.action-btn {
    width: 100%;
    padding: 12px;
    margin: 0;
    height: auto;
    font-size: 1em;
    background: linear-gradient(145deg, #6b5c4399, #6b5c43);
    color: #c6bba5;
    border: 2px solid #b8a070;
    border-radius: 6px;
}

.currency-counter {
    width: 100%;
    padding: 15px;
    margin: 0;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    align-items: center; /* Center items vertically */
    justify-content: center;
    background: rgba(35, 27, 18, 0.9);
    border-radius: 8px;
    border: 2px solid #8a7850;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .info-btn {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .action-buttons {
        width: 100%;
    }
}

.clickable-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 8px 5px !important;
}

.clickable-item:hover {
    background: rgba(184, 160, 112, 0.2);
    transform: translateX(5px);
}

.click-hint {
    color: #b8a070;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clickable-item:hover .click-hint {
    opacity: 1;
}

.purchased-badge {
    display: inline-block;
    background: linear-gradient(145deg, #5a7d5a, #4a6b4a);
    color: #e0d5c0;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

:root {
    --emerald: #07342b;
    --obsidian: #18181b;
    --electrum: #e6c86e;
    --violet: #6d4e9c;
    --header-gold: #ffe9a5;
    --body-text: #e6e2d7;
    --body-muted: #b9b5a9;
    --card-bg: rgba(24, 24, 27, 0.92); /* more black, less brown */
    --card-border: #23232a; /* obsidian black */
    --gold-glow: 0 0 12px #ffe9a5, 0 0 2px #e6c86e;
    --violet-glow: 0 0 10px #6d4e9c, 0 0 2px #b08dff;
    --arcane-sigil: url("data:image/svg+xml,%3Csvg width='300' height='300' viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='150' cy='150' r='120' fill='none' stroke='%236d4e9c' stroke-width='4' opacity='0.18'/%3E%3Ccircle cx='150' cy='150' r='80' fill='none' stroke='%23e6c86e' stroke-width='2' opacity='0.12'/%3E%3Cpath d='M150 30 L170 270 M30 150 L270 150' stroke='%23ffe9a5' stroke-width='1' opacity='0.08'/%3E%3C/svg%3E");
}

.role-buttons {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.role-buttons .buy-btn {
    flex: 1;
}

.instruction-list {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
    color: #e0d5c0;
}

.instruction-list li {
    margin-bottom: 8px;
}

