@font-face {
    font-family: 'Harreegh Popped Cyrillic';
    src: url('/HarreeghPoppedCyrillic.ttf') format('truetype');
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background: #0f0c29; /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #24243e, #302b63, #0f0c29); /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    color: #e0e0e0;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.05) 2px, transparent 2px);
    background-size: 100px 100px;
    animation: move-stars 120s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes move-stars {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -1000px 1000px;
    }
}

@keyframes move-lines {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 100%;
    }
}

html {
    scroll-behavior: smooth;
}

#root {
    width: 100%;
    height: 100%;
}

#app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
    position: relative;
}

.title {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 3rem;
    color: #f0f0f0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 8px #00ffff;
    margin-top: 3rem;
}

#shop-main-view {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    width: 100%;
}

.shop-side-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.drop-rates {
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background-color: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 280px;
    text-align: left;
    font-size: 1.1rem;
}

.drop-rates h3 {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #00ffff;
    font-size: 1.3rem;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.drop-rates p {
    margin: 0.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.drop-rates p strong {
    color: #e0e0e0;
    text-transform: uppercase;
}

.pity-bonus-tracker {
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
    color: #00ffff;
    text-shadow: 1px 1px 2px black;
}

.pity-tracker {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pity-tracker h4 {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #FFC107;
    font-size: 1.2rem;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.pity-tracker p {
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    font-size: 1rem;
}

.auto-mode-toggle {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#auto-mode-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 12, 41, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-out;
}

.auto-mode-controls {
    text-align: center;
    background-color: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auto-mode-controls h2 {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    color: #00ffff;
    font-size: 1.8rem;
    margin: 0 0 1rem 0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.auto-mode-controls h3 {
    margin: 1rem 0 0;
    font-size: 1.2rem;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.auto-mode-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1.3rem;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.auto-mode-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #00ffff;
}

.auto-mode-toggle-button {
    padding: 0.8rem 2rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: all 0.2s;
    min-width: 180px;
}

.auto-mode-toggle-button {
    background: linear-gradient(45deg, #4CAF50, #81C784);
    color: white;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}

.auto-mode-toggle-button.active {
    background: linear-gradient(45deg, #f44336, #e57373);
    box-shadow: 0 4px 10px rgba(244, 67, 54, 0.4);
}

.auto-mode-summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    background: rgba(17, 17, 17, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 200px;
    overflow-y: auto;
}

.summary-card-item {
    position: relative;
    width: 100px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    animation: fadeInSummary 0.5s ease-out forwards;
}

@keyframes fadeInSummary {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.summary-card-item.common { box-shadow: 0 0 3px 1px #c0c0c0; }
.summary-card-item.rare { 
    box-shadow: 0 0 6px 2px #2196F3;
}
.summary-card-item.ultra-rare { 
    box-shadow: 0 0 10px 2px #9C27B0;
}
.summary-card-item.legendary { 
    box-shadow: 0 0 12px 3px #FFC107;
}
.summary-card-item.special { 
    box-shadow: 0 0 15px 3px #ff4e50; 
    animation: fadeInSummary 0.5s ease-out forwards, pulse-special-summary 1.5s infinite alternate;
}

@keyframes pulse-special-summary {
    from { box-shadow: 0 0 12px 3px #ff4e50; }
    to { box-shadow: 0 0 20px 4px #ff6a88; }
}

.summary-card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-card-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-shadow: 1px 1px 2px black;
}

.auto-mode-toggle label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.auto-mode-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00ffff;
}

.nav-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background-color: rgba(34, 34, 34, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-nav-container {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 500;
}

.secondary-nav-button {
    padding: 0.5rem 1rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    background-color: rgba(34, 34, 34, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.secondary-nav-button:hover {
    background-color: rgba(51, 51, 51, 0.7);
    color: #fff;
    border-color: #888;
}

.secondary-nav-button.active {
    background-color: #00ffff;
    color: #1a1a2e;
    box-shadow: 0 0 8px #00ffff;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    border-color: #00ffff;
}

.nav-button {
    position: relative;
    padding: 0.8rem 1.5rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    background-color: transparent;
    color: #e0e0e0;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.nav-button:hover {
    background-color: #333;
    border-color: #00ffff;
}

.nav-button.active {
    background-color: #00ffff;
    color: #1a1a2e;
    box-shadow: 0 0 10px #00ffff;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}

.nav-button .cooldown-ready-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background-color: #ff4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid #111;
    animation: pulse-indicator 1.5s infinite;
    pointer-events: none;
}

@keyframes pulse-indicator {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#pack-wrapper {
    position: relative;
    text-align: center;
}

#booster-pack {
    width: 200px;
    max-width: 80vw;
    cursor: pointer;
    transition: transform 0.2s ease-out, filter 0.2s;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
}

#booster-pack:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 15px 20px rgba(0,0,0,0.5));
}

.click-to-open {
    color: #fff;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    margin-top: 1rem;
    animation: pulse-text 2s infinite;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

#card-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    min-height: 380px;
    width: 100%;
    flex-wrap: wrap;
    perspective: 2000px;
}

.inventory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
}

.inventory-card-wrapper {
    position: relative;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.inventory-card-wrapper.owned {
    cursor: pointer;
}

.inventory-card-wrapper.owned:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.inventory-card-wrapper .card {
    width: 250px;
    height: 350px;
}

.inventory-card-wrapper .card-inner {
    transform: rotateY(180deg);
}

.inventory-card-wrapper.unowned .card-front-image {
    filter: grayscale(1) brightness(0.5);
}

.unowned-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    text-shadow: 1px 1px 2px black;
    border-radius: 15px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

.inventory-card-wrapper:hover .unowned-card-overlay {
    opacity: 0;
}

.loading-text {
    font-size: 1.5rem;
    color: #e0e0e0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.card {
    width: 250px;
    height: 350px;
    position: relative;
    visibility: hidden; /* Initially hidden, JS will reveal */
}

.card.inspectable {
    cursor: pointer;
}

/* Overlay and icon for inspectable cards in inventory */
.card.inspectable .card-front::before,
.card.inspectable .card-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    transition: all 0.2s ease-in-out;
    opacity: 0;
}

/* Darkening overlay */
.card.inspectable .card-front::before {
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Magnifying glass icon */
.card.inspectable .card-front::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='white'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3Csvg%3E");
    background-size: 60px;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(0.8);
    z-index: 2;
}

.card.inspectable:hover .card-front::before {
    opacity: 1;
}

.card.inspectable:hover .card-front::after {
    opacity: 1;
    transform: scale(1);
}

.card.is-visible {
    visibility: visible;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s; /* Fallback for CSS-only if GSAP fails, GSAP overrides this */
}

.card.can-flip[data-flipped="false"] {
    cursor: pointer;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
}

.card-back {
    background: url('/card back.webp') no-repeat center center;
    background-size: contain;
    background-color: transparent;
    transition: box-shadow 0.2s ease-out; /* For hover glow */
}

.card-front {
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent; /* Changed to transparent */
}

.card-front-image {
    height: 100%; /* Full height */
    width: auto; /* Maintain aspect ratio */
    max-width: 100%; /* Prevent overflow */
    object-fit: contain; /* Show full image without cropping */
    border-radius: 15px;
    display: block;
    position: relative;
    flex-shrink: 0;
}

.card-count-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #00ffff;
    color: #111;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 2px 8px;
    border-radius: 50%;
    border: 2px solid #111;
    z-index: 10;
    pointer-events: none;
}

.card-content {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    display: grid;
    grid-template-rows: 50px 1fr 50px;
    padding: 15px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.card-art {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.card-frame {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 3;
    pointer-events: none;
}

.card-title {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    color: white;
    text-align: center;
    font-size: 1.2rem;
    z-index: 4;
    align-self: center;
    grid-row: 1;
    text-shadow: 1px 1px 3px black;
}

.card-stats {
    z-index: 4;
    align-self: center;
    grid-row: 3;
    display: flex;
    justify-content: space-around;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px black;
}

/* Rarity Effects - now only apply when card is flipped */
.card[data-flipped="true"].common { filter: drop-shadow(0 0 3px #c0c0c0); }
.card[data-flipped="true"].uncommon { filter: drop-shadow(0 0 8px #4CAF50); }
.card[data-flipped="true"].rare { 
    filter: drop-shadow(0 0 8px #2196F3);
} 
.card[data-flipped="true"].ultra-rare { 
    filter: drop-shadow(0 0 15px #9C27B0);
}
.card[data-flipped="true"].legendary { 
    filter: drop-shadow(0 0 20px #FFC107);
}
.card[data-flipped="true"].special { 
    filter: drop-shadow(0 0 25px #ff4e50);
    animation: fadeInSummary 0.5s ease-out forwards, pulse-special 1.5s infinite alternate;
}

@keyframes pulse-special {
    from { filter: drop-shadow(0 0 20px #ff4e50) drop-shadow(0 0 5px #fff); }
    to { filter: drop-shadow(0 0 35px #ff6a88) drop-shadow(0 0 10px #fff); }
}

#reset-button {
    display: none; /* Initially hidden */
    padding: 1rem 2rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    background-color: #222;
    color: #00ffff;
    border: 1px solid #00ffff;
    border-radius: 8px;
    transition: all 0.2s;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#reset-button:hover {
    background-color: #00ffff;
    color: #1a1a2e;
    box-shadow: 0 0 15px #00ffff;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}

/* Card Modal styles */
.card-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card-modal-content {
    cursor: default;
    animation: zoomIn 0.3s ease-out;
    background: linear-gradient(135deg, rgba(35, 30, 60, 0.7), rgba(15, 12, 41, 0.7));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow-y: auto;
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.modal-card-view {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-modal-image {
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    z-index: 2;
    position: relative;
    flex-shrink: 0;
}

.card-modal-rarity-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 15px;
    z-index: 1;
    opacity: 0.8;
}

.card-modal-rarity-glow.common     { box-shadow: 0 0 20px 5px #c0c0c0; }
.card-modal-rarity-glow.rare       { box-shadow: 0 0 30px 8px #2196F3; }
.card-modal-rarity-glow.ultra-rare { box-shadow: 0 0 40px 10px #9C27B0; }
.card-modal-rarity-glow.legendary  { box-shadow: 0 0 50px 12px #FFC107; }
.card-modal-rarity-glow.special    { box-shadow: 0 0 60px 15px #ff4e50; }

.modal-details-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    color: #fff;
    width: 100%;
    max-width: 350px;
    min-width: 300px;
}

.modal-card-name {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 2.5rem;
    color: #f0f0f0;
    text-shadow: 0 0 8px #00ffff;
    margin: 0;
    text-align: center;
}

.modal-card-count {
    font-size: 1.2rem;
    text-align: center;
    color: #ccc;
    margin: -1rem 0 0 0;
}

.sell-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background-color: rgba(17, 17, 17, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sell-controls label {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px black;
    color: #e0e0e0;
}

.sell-quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sell-quantity-selector input[type="range"] {
    flex-grow: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 5px;
    outline: none;
}
.sell-quantity-selector input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #00ffff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #111;
  margin-top: -6px; /* You need to specify a margin in Chrome, but not in Firefox */
}

.sell-quantity-value {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.sell-summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sell-earnings {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFC107;
    text-shadow: 0 0 5px #FFC107;
}

.sell-button {
    padding: 0.8rem 2rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    background: linear-gradient(45deg, #4CAF50, #81C784);
    color: white;
    border: none;
    border-radius: 8px;
    transition: all 0.2s;
    width: 100%;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}

.sell-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 187, 106, 0.6);
}

.balance-display {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: rgba(34, 34, 34, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1.5rem;
    text-shadow: 1px 1px 0 #000, 0 0 5px #FFC107;
    z-index: 500;
    transition: opacity 0.3s ease-in-out;
}

/* Notification styles */
.notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 90%;
    max-width: 450px;
}

.notification {
    background-color: rgba(30, 30, 45, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e0e0e0;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    animation: slideInDown 0.4s ease-out forwards;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    text-shadow: 1px 1px 2px black;
    width: 100%;
}

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

.notification.notification-error {
    border-left: 4px solid #ff4e50;
}

.notification.notification-info {
    border-left: 4px solid #00ffff;
}

.notification p {
    margin: 0;
    line-height: 1.4;
    flex-grow: 1;
}

.notification-close {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    align-self: flex-start;
}

.notification-buttons {
    display: flex;
    gap: 1rem;
    align-self: flex-end;
}

.notification-buttons button {
    padding: 0.5rem 1rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid #666;
    transition: all 0.2s;
    text-shadow: none;
}

.notification-buttons button:first-child { /* Confirm button */
    background-color: #4CAF50;
    color: white;
    border-color: #66BB6A;
}
.notification-buttons button:first-child:hover {
    background-color: #5cb85c;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}

.notification-buttons button:last-child { /* Cancel button */
    background-color: #f44336;
    color: white;
    border-color: #d43f3a;
}
.notification-buttons button:last-child:hover {
     background-color: #e57373;
     box-shadow: 0 4px 10px rgba(244, 67, 54, 0.4);
}

.daily-reward-container {
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background-color: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 280px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.daily-reward-container h3 {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #FFC107;
    font-size: 1.3rem;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.daily-reward-container p {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
    text-shadow: 1px 1px 2px black;
}

.daily-reward-container button {
    padding: 0.8rem 1.5rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    background-color: #FFC107;
    color: #111;
    border: none;
    border-radius: 8px;
    transition: all 0.2s;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 0px #fff;
}

.daily-reward-container button:hover:not(:disabled) {
    background-color: #ffd54f;
    box-shadow: 0 0 10px #ffd54f;
}

.daily-reward-container button:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
    text-shadow: none;
}

.minigame-cooldown-banner {
    background-color: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    color: #ffcccc;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
}

.minigame-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background-color: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 600px;
    text-shadow: 1px 1px 2px black;
    position: relative;
}

.minigame-back-button {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid #555;
    color: #ccc;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.minigame-back-button:hover {
    background: rgba(0,0,0,0.4);
    color: #fff;
    border-color: #888;
}

.minigame-container h2 {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 2.5rem;
    color: #00ffff;
    margin: 0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 8px #00ffff;
    text-align: center;
}

.minigame-instructions-area {
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.minigame-instructions {
    text-align: center;
    color: #ccc;
    padding: 1rem;
}

.minigame-broken-message {
    font-size: 1.1rem;
    color: #ff4e50;
    text-shadow: 1px 1px 2px black;
    text-align: center;
    margin-bottom: 0.5rem;
}

.minigame-start-button {
    padding: 1rem 2.5rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1.3rem;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.minigame-start-button:hover:not(:disabled) {
    background-color: #66BB6A;
    box-shadow: 0 0 10px #66BB6A;
}

.minigame-start-button:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 500px;
    text-shadow: 1px 1px 2px black;
}

.settings-container h2 {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 2.5rem;
    color: #00ffff;
    margin: 0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 8px #00ffff;
    text-align: center;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.setting-item label {
    font-size: 1.3rem;
    color: #e0e0e0;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-control input[type="range"] {
    flex-grow: 1;
    cursor: pointer;
    accent-color: #00ffff;
}

.setting-control span {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    background-color: rgba(17, 17, 17, 0.5);
    padding: 0.3rem 0.5rem;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Preloader styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(-45deg, #1a1221, #121a21, #0d0d0d, #151515);
    background-size: 400% 400%;
    animation: gradient 20s ease infinite;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #e0e0e0;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1.8rem;
    z-index: 9999;
    text-shadow: 1px 1px 2px black;
}

.loading-spinner {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #00ffff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: #ff4e50;
    text-align: center;
    padding: 20px;
    border: 1px solid #ff4e50;
    background-color: rgba(255, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1.5rem;
}

.error-full-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ff4e50;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 2rem;
    text-align: center;
    z-index: 9999;
}

.whats-new-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 600px;
    text-shadow: 1px 1px 2px black;
}

.whats-new-container h2 {
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 2.5rem;
    color: #00ffff;
    margin: 0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 8px #00ffff;
    text-align: center;
}

.update-item {
    background: rgba(34, 34, 34, 0.5);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 3px solid #00ffff;
}

.update-item h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #e0e0e0;
    font-size: 1.5rem;
}

.update-item ul {
    list-style-type: '✓ ';
    padding-left: 20px;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.update-item li {
    padding-left: 10px;
    margin-bottom: 0.5rem;
}

/* Confirmation Modal */
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.confirmation-dialog {
    background: linear-gradient(135deg, rgba(35, 30, 60, 0.9), rgba(15, 12, 41, 0.9));
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    text-shadow: 1px 1px 2px black;
    animation: zoomIn 0.3s ease-out;
}

.confirmation-dialog p {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.5;
    color: #e0e0e0;
}

.confirmation-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.confirmation-buttons button {
    padding: 0.8rem 2rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-shadow: none;
    min-width: 120px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.confirmation-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.confirmation-buttons button:first-child { /* Confirm button */
    background-color: #4CAF50;
    color: white;
    border-color: #66BB6A;
}
.confirmation-buttons button:first-child:hover {
    background-color: #5cb85c;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}

.confirmation-buttons button:last-child { /* Cancel button */
    background-color: #d9534f;
    color: white;
    border-color: #d43f3a;
}
.confirmation-buttons button:last-child:hover {
     background-color: #e57373;
     box-shadow: 0 4px 10px rgba(244, 67, 54, 0.4);
}

@media (max-width: 900px) {
    .card-modal-content {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }
    .card-modal-image {
        max-height: 40vh;
    }
    .modal-details-view {
        min-width: unset;
        width: 100%;
        max-width: 400px;
    }
    .portal-content {
        flex-direction: column;
        max-height: 95vh;
    }
    .portal-info-panel {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    #shop-main-view {
        flex-direction: column;
    }
}

/* Custom Scrollbar Styles */
body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

body::-webkit-scrollbar-thumb {
    background-color: #00ffff;
    border-radius: 10px;
    border: 3px solid #1a1a1a;
}

body::-webkit-scrollbar-thumb:hover {
    background-color: #00dddd;
}

.what-can-drop-grid::-webkit-scrollbar { width: 8px; }
.what-can-drop-grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
.what-can-drop-grid::-webkit-scrollbar-thumb { background-color: #00ffff; border-radius: 4px; }

.portal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 12, 41, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-out;
}

.portal-content {
    background: linear-gradient(145deg, rgba(35, 30, 60, 0.7), rgba(15, 12, 41, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.portal-back-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid #555;
    color: #ccc;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    z-index: 5;
}
.portal-back-button:hover {
    background: rgba(0,0,0,0.4);
    color: #fff;
    border-color: #888;
}

.portal-info-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding-right: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-pack-image {
    width: 200px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
}

.portal-title {
    font-size: 2rem;
    color: #f0f0f0;
    text-shadow: 0 0 8px #00ffff;
    margin: 0;
}

.portal-description {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 300px;
}

.portal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.portal-actions button {
    padding: 0.8rem 1rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    transition: all 0.2s;
    background: #00ffff;
    color: #111;
    text-shadow: 1px 1px 0 #fff;
}
.portal-actions button:hover:not(:disabled) {
    background-color: #33ffff;
    box-shadow: 0 0 10px #33ffff;
}
.portal-actions button:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
    text-shadow: none;
}

.custom-open-group {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.5rem;
}
.custom-open-group input {
    flex-grow: 1;
    width: 50%;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #555;
    background: #222;
    color: #fff;
    text-align: center;
    font-family: sans-serif;
}
.custom-open-group button {
    flex-grow: 1;
}

.auto-mode-button {
    grid-column: 1 / -1;
    background: #FFC107 !important;
}

.portal-details-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    padding-right: 10px; /* space for scrollbar */
}

.what-can-drop {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 10px;
}
.what-can-drop h4 {
    text-align: center;
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #e0e0e0;
}
.what-can-drop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
    padding: 0.5rem;
}
.drop-preview-card {
    width: 100%;
    border-radius: 5px;
}
.drop-preview-card.common { box-shadow: 0 0 3px 1px #c0c0c0; }
.drop-preview-card.rare { box-shadow: 0 0 4px 1px #2196F3; }
.drop-preview-card.ultra-rare { box-shadow: 0 0 5px 1px #9C27B0; }
.drop-preview-card.legendary { box-shadow: 0 0 6px 2px #FFC107; }
.drop-preview-card.special { box-shadow: 0 0 7px 2px #ff4e50; }

.multi-open-summary-content {
    background: linear-gradient(135deg, rgba(35, 30, 60, 0.9), rgba(15, 12, 41, 0.9));
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
}
.multi-open-summary-content h2 {
    font-size: 2rem;
    color: #e0e0e0;
    margin: 0;
}
.portal-close-button {
    padding: 0.8rem 2.5rem;
    font-family: 'Harreegh Popped Cyrillic', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    background-color: #00ffff;
    color: #111;
    border: none;
    border-radius: 8px;
    transition: all 0.2s;
}