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

body {
    background-color: #808080;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
}

.cards-wrapper {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.initial-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.money-box {
    background-color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #000000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    color: #333;
    letter-spacing: 1px;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

.money-box.fade-out {
    opacity: 0;
}

.card {
    background-color: white;
    padding: 60px 30px;
    border-radius: 12px;
    border: 3px solid #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 250px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

#initial-card.fade-out,
.card.fade-out {
    opacity: 0;
}

.card h1 {
    font-size: 32px;
    color: #333;
    font-weight: 400;
    line-height: 1.2;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 2px;
}

.shop-card {
    width: 180px;
    min-height: 280px;
    padding: 40px 20px;
    cursor: default;
}

.shop-card h1 {
    font-size: 24px;
}

#cards-container {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    justify-content: space-around;
    align-items: center;
    padding: 0 50px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

#cards-container.show {
    opacity: 1;
    visibility: visible;
}

#cards-container .card {
    cursor: default;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#cards-container.show .card {
    opacity: 1;
}

.top-label-box {
    width: 180px;
    height: 45px;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    margin-bottom: 15px;
}

.top-label-text {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    line-height: 1.2;
}

.special-label-box {
    width: 180px;
    height: 50px;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    margin-bottom: 15px;
}

.special-label-text {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    line-height: 1.2;
}

.game-box {
    width: 180px;
    height: 120px;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    padding: 15px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.game-name {
    font-size: 20px;
    color: #333;
    font-weight: 600;
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    line-height: 1.2;
}

/* Card color variants */
.card-white {
    background-color: #ffffff;
}

.card-black {
    background-color: #000000;
}

.card-orange {
    background-color: #e6a85c;
}

.card-red {
    background-color: #cc6666;
}

.card-blue {
    background-color: #6699cc;
}

.card-green {
    background-color: #88cc88;
}

.card-purple {
    background-color: #aa88aa;
}

.card-pink {
    background-color: #dd99bb;
}

.card-brown {
    background-color: #8b4513;
}

.card-dark-green {
    background-color: #006400;
}

.card-dark-blue {
    background-color: #000080;
}

.card-dark-gray {
    background-color: #404040;
}

.card-dark-red {
    background-color: #8b0000;
}

/* Rainbow card - animating gradient */
.card-rainbow {
    background: linear-gradient(90deg, 
        #cc6666 0%,
        #d69966 14.28%,
        #cccc88 28.56%,
        #88cc88 42.84%,
        #6699cc 57.12%,
        #9988cc 71.4%,
        #cc88cc 85.68%,
        #cc6666 100%
    );
    background-size: 600% 100%;
    animation: rainbow-shift 3s linear infinite;
}

@keyframes rainbow-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 600% 50%; }
}

/* Black and White pattern */
.card-black-white {
    background: repeating-linear-gradient(
        45deg,
        #000000,
        #000000 10px,
        #ffffff 10px,
        #ffffff 20px
    );
}

/* Glowing white */
.card-glowing-white {
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 
                0 0 40px rgba(255, 255, 255, 0.6),
                0 0 60px rgba(255, 255, 255, 0.4),
                0 4px 20px rgba(0, 0, 0, 0.3);
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 
                    0 0 40px rgba(255, 255, 255, 0.6),
                    0 0 60px rgba(255, 255, 255, 0.4),
                    0 4px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 1), 
                    0 0 60px rgba(255, 255, 255, 0.8),
                    0 0 90px rgba(255, 255, 255, 0.6),
                    0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

/* Border color variants */
.border-white {
    border-color: #ffffff !important;
}

.border-black {
    border-color: #000000 !important;
}

.border-orange {
    border-color: #ff8c00 !important;
}

.border-red {
    border-color: #ff0000 !important;
}

.border-blue {
    border-color: #0080ff !important;
}

.border-green {
    border-color: #00ff00 !important;
}

.border-purple {
    border-color: #800080 !important;
}

.border-pink {
    border-color: #ff69b4 !important;
}

.border-brown {
    border-color: #8b4513 !important;
}

.border-dark-green {
    border-color: #006400 !important;
}

.border-dark-blue {
    border-color: #000080 !important;
}

.border-dark-gray {
    border-color: #404040 !important;
}

.border-dark-red {
    border-color: #8b0000 !important;
}

/* Rainbow border - animating gradient */
.border-rainbow {
    border-color: #ff0000 !important;
    animation: rainbow-border-color 3s linear infinite;
}

@keyframes rainbow-border-color {
    0% { border-color: #ff0000; }
    14.28% { border-color: #ff8000; }
    28.56% { border-color: #ffff00; }
    42.84% { border-color: #00ff00; }
    57.12% { border-color: #0080ff; }
    71.4% { border-color: #8000ff; }
    85.68% { border-color: #ff00ff; }
    100% { border-color: #ff0000; }
}

/* Black and White border pattern */
.border-black-white {
    border-image: repeating-linear-gradient(
        45deg,
        #000000,
        #000000 10px,
        #ffffff 10px,
        #ffffff 20px
    ) 1;
    border-image-slice: 1;
}

/* Glowing white border */
.border-glowing-white {
    border-color: #ffffff !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
                0 0 20px rgba(255, 255, 255, 0.6),
                0 4px 20px rgba(0, 0, 0, 0.3),
                inset 0 0 10px rgba(255, 255, 255, 0.4);
    animation: border-glow-pulse 2s ease-in-out infinite;
}

@keyframes border-glow-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
                    0 0 20px rgba(255, 255, 255, 0.6),
                    0 4px 20px rgba(0, 0, 0, 0.3),
                    inset 0 0 10px rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 1),
                    0 0 30px rgba(255, 255, 255, 0.8),
                    0 4px 20px rgba(0, 0, 0, 0.3),
                    inset 0 0 15px rgba(255, 255, 255, 0.6);
    }
}

/* Card grade variants - applying darkness/grayness effects */
[class*="grade-S"] {
    /* Normal colors - no filter */
    filter: none;
}

[class*="grade-A+"] {
    /* Slightly darker */
    filter: brightness(0.98);
}

[class*="grade-A"]:not([class*="grade-A+"]):not([class*="grade-A-"]) {
    /* Barely darker but more visible than A+ */
    filter: brightness(0.95);
}

[class*="grade-A-"] {
    /* A bit darker */
    filter: brightness(0.92);
}

[class*="grade-B+"] {
    /* Grayer but still can tell colors */
    filter: brightness(0.90) saturate(0.8) grayscale(0.1);
}

[class*="grade-B"]:not([class*="grade-B+"]):not([class*="grade-B-"]) {
    /* Same as B+ but darker */
    filter: brightness(0.85) saturate(0.7) grayscale(0.2);
}

[class*="grade-B-"] {
    /* Colors starting to become hard to tell */
    filter: brightness(0.75) saturate(0.6) grayscale(0.3);
}

[class*="grade-C+"] {
    /* Dark and very hard to tell colors */
    filter: brightness(0.65) saturate(0.5) grayscale(0.4);
}

[class*="grade-C"]:not([class*="grade-C+"]):not([class*="grade-C-"]) {
    /* Same as C+ but darker */
    filter: brightness(0.55) saturate(0.4) grayscale(0.5);
}

[class*="grade-C-"] {
    /* Colors nearly impossible to tell */
    filter: brightness(0.45) saturate(0.3) grayscale(0.65);
}

.grade-D {
    /* Foggy with gray splotches */
    position: relative;
    filter: brightness(0.35) saturate(0.2) grayscale(0.75);
}

.grade-D::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: 
        radial-gradient(circle at 20% 30%, rgba(128, 128, 128, 0.25) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(128, 128, 128, 0.25) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(128, 128, 128, 0.2) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.grade-F {
    /* All gray, impossible to tell color */
    filter: brightness(0.3) saturate(0) grayscale(0.9);
}

/* Card Data Modal */
.card-data-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.card-data-content {
    background: #000000;
    padding: 30px;
    border-radius: 12px;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #cccccc;
}

.modal-title {
    font-size: 28px;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-align: center;
    color: #ffffff;
}

#card-data-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #333;
}

.data-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
    flex: 1;
}

.data-value {
    color: #ffffff;
    font-size: 14px;
    flex: 1;
    text-align: center;
    font-weight: 500;
}

.data-rarity {
    color: #ffffff;
    font-size: 12px;
    flex: 1;
    text-align: right;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
}

.pick-button {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pick-button:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

/* Collection Modal Styles */
.collection-content {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

#collection-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.collection-card-item {
    background-color: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 15px;
}

.collection-card-header {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-button {
    background: none;
    border: none;
    color: #cccccc;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.favorite-button:hover {
    transform: scale(1.2);
}

.favorite-button.favorited {
    color: #ffd700;
}

.collection-card-item.favorited {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.collection-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.collection-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-size: 13px;
    gap: 10px;
}

.collection-detail-row span:first-child {
    font-weight: 600;
    min-width: 60px;
}

.collection-detail-row span:nth-child(2) {
    flex: 1;
    text-align: center;
}

.collection-rarity {
    color: #cccccc;
    font-size: 11px;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    min-width: 70px;
    text-align: right;
}

/* Shop Modal Styles */
.shop-card-item {
    position: relative;
}

.sell-button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 5px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sell-button:hover:not(.disabled) {
    background-color: #ff0000;
    color: #ffffff;
    border-color: #ff0000;
}

.sell-button.disabled {
    background-color: #666666;
    color: #999999;
    border-color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

.sell-all-button {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background-color: #ff0000;
    color: #ffffff;
    border: 2px solid #ff0000;
    border-radius: 5px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sell-all-button:hover {
    background-color: #cc0000;
    border-color: #cc0000;
}

/* Notification Styles */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.money-notification {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.money-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Title Display Styles */
.title-display {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
    color: #000000;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #000000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 1px;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
    display: none;
}

.title-display.fade-out {
    opacity: 0;
}

/* Shop Tabs Styles */
.shop-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.shop-tab {
    flex: 1;
    padding: 10px;
    background-color: #1a1a1a;
    color: #ffffff;
    border: 2px solid #333;
    border-radius: 5px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-tab:hover {
    background-color: #2a2a2a;
    border-color: #555;
}

.shop-tab.active {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Titles List Styles */
#titles-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.title-item {
    background-color: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.title-item.unlocked {
    border-color: #4CAF50;
}

.title-item.equipped {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.title-item.locked {
    opacity: 0.6;
}

.title-name {
    color: #ffffff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 1px;
}

.title-requirement {
    color: #cccccc;
    font-size: 14px;
}

.equip-title-button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: #ffffff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.equip-title-button:hover {
    background-color: #45a049;
    border-color: #45a049;
}

.equip-title-button.equipped {
    background-color: #ffd700;
    color: #000000;
    border-color: #ffd700;
    cursor: default;
}

.equip-title-button.equipped:hover {
    background-color: #ffd700;
    border-color: #ffd700;
}

.title-locked {
    color: #888888;
    font-size: 14px;
    font-style: italic;
}

/* Title Separator Styles */
.title-separator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
    gap: 5px;
}

.title-separator-line {
    width: 100%;
    height: 1px;
    background-color: #555;
    border: none;
}

.title-separator-text {
    color: #888888;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

