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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --accent-orange: #ff6b35;
    --accent-yellow: #ffc107;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;

    /* Rarity colors */
    --rarity-consumer: #b0c3d9;
    --rarity-industrial: #5e98d9;
    --rarity-milspec: #4b69ff;
    --rarity-restricted: #8847ff;
    --rarity-classified: #d32ce6;
    --rarity-covert: #eb4b4b;
    --rarity-gold: #ffd700;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(75, 105, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent-orange);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.balance-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.balance-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-yellow);
}

.currency {
    color: var(--accent-yellow);
    font-size: 18px;
}

/* Main Content */
main {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

h2 {
    font-size: 28px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-orange);
}

/* Cases Grid */
.cases-section {
    margin-bottom: 60px;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.case-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.case-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-orange);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.2);
}

.case-image-container {
    position: relative;
    padding: 30px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.case-image {
    width: 180px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.case-card:hover .case-image {
    transform: scale(1.1);
}

.case-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    pointer-events: none;
}

.case-info {
    padding: 20px;
    text-align: center;
}

.case-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.case-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-yellow);
}

/* Opening Section */
.opening-section {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.opening-section.active {
    display: flex;
}

.opening-container {
    width: 100%;
    max-width: 900px;
    padding: 40px;
}

.opening-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.opening-header h3 {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 36px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--accent-orange);
}

/* Roulette */
.roulette-container {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px 0;
    margin-bottom: 40px;
}

.roulette-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--accent-orange);
    z-index: 10;
    box-shadow: 0 0 20px var(--accent-orange);
}

.roulette-pointer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid var(--accent-orange);
}

.roulette-pointer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid var(--accent-orange);
}

.roulette-track {
    display: flex;
    gap: 8px;
    transition: transform 5s cubic-bezier(0.15, 0.85, 0.35, 1);
}

.roulette-item {
    flex-shrink: 0;
    width: 130px;
    height: 130px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-bottom: 4px solid;
    position: relative;
    overflow: hidden;
}

.roulette-item img {
    width: 90px;
    height: 70px;
    object-fit: contain;
}

.roulette-item-name {
    font-size: 10px;
    text-align: center;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Opening Controls */
.opening-controls {
    display: flex;
    justify-content: center;
}

.btn-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 60px;
    background: linear-gradient(135deg, var(--accent-orange), #ff8c5a);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-open:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

.btn-open:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-text {
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

.btn-price {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Result Modal */
.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.result-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.result-content {
    text-align: center;
    padding: 40px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-rarity {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 4px;
    margin-bottom: 20px;
    padding: 8px 24px;
    border-radius: 4px;
    display: inline-block;
}

.result-item {
    margin-bottom: 20px;
}

.result-image {
    width: 300px;
    height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.result-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: 30px;
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-sell, .btn-again {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-sell {
    background: var(--accent-yellow);
    color: var(--bg-primary);
}

.btn-sell:hover {
    background: #ffcd38;
    transform: translateY(-3px);
}

.btn-again {
    background: var(--accent-orange);
    color: white;
}

.btn-again:hover {
    background: #ff8c5a;
    transform: translateY(-3px);
}

/* Inventory Section */
.inventory-section {
    margin-top: 60px;
}

.inventory-value {
    color: var(--accent-yellow);
    font-size: 20px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.inventory-item {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border-bottom: 3px solid;
    transition: all 0.3s;
    cursor: pointer;
}

.inventory-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.inventory-item img {
    width: 120px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 10px;
}

.inventory-item-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-item-price {
    font-size: 14px;
    color: var(--accent-yellow);
    font-weight: 700;
}

.inventory-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
    font-size: 18px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    border-top: 1px solid var(--bg-tertiary);
    margin-top: 60px;
}

/* Rarity-specific styles */
.rarity-consumer { border-color: var(--rarity-consumer); }
.rarity-industrial { border-color: var(--rarity-industrial); }
.rarity-milspec { border-color: var(--rarity-milspec); }
.rarity-restricted { border-color: var(--rarity-restricted); }
.rarity-classified { border-color: var(--rarity-classified); }
.rarity-covert { border-color: var(--rarity-covert); }
.rarity-gold { border-color: var(--rarity-gold); }

.result-rarity.consumer { background: var(--rarity-consumer); color: #000; }
.result-rarity.industrial { background: var(--rarity-industrial); }
.result-rarity.milspec { background: var(--rarity-milspec); }
.result-rarity.restricted { background: var(--rarity-restricted); }
.result-rarity.classified { background: var(--rarity-classified); }
.result-rarity.covert { background: var(--rarity-covert); }
.result-rarity.gold { background: var(--rarity-gold); color: #000; }

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    main {
        padding: 20px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .roulette-item {
        width: 100px;
        height: 100px;
    }

    .roulette-item img {
        width: 70px;
        height: 50px;
    }

    .result-image {
        width: 200px;
        height: 150px;
    }

    .result-actions {
        flex-direction: column;
    }
}

/* Sound effect animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.spinning .roulette-track {
    animation: none;
}

/* Prank Overlay Styles */
.prank-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.prank-overlay.active {
    display: flex;
    animation: prankFadeIn 0.5s ease;
}

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

.prank-content {
    text-align: center;
    padding: 40px;
}

.prank-glitch {
    font-size: 64px;
    font-weight: 900;
    color: #ff0000;
    text-shadow:
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 40px #ff0000,
        0 0 80px #ff0000;
    animation: glitch 0.5s infinite;
    position: relative;
    letter-spacing: 4px;
}

.prank-glitch::before,
.prank-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.prank-glitch::before {
    color: #0ff;
    animation: glitchBefore 0.5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.prank-glitch::after {
    color: #f0f;
    animation: glitchAfter 0.5s infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
}

@keyframes glitchBefore {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(-2px, 2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(-2px, -2px); }
}

@keyframes glitchAfter {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
}

.prank-skull {
    font-size: 120px;
    margin: 20px 0;
    animation: skullPulse 1s infinite;
}

@keyframes skullPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px #ff0000); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 40px #ff0000); }
}

.prank-subtitle {
    font-size: 32px;
    color: #ff0000;
    letter-spacing: 8px;
    margin-bottom: 30px;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.5; }
}

.prank-ip {
    font-size: 24px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    background: rgba(0, 255, 0, 0.1);
    padding: 15px 30px;
    border: 2px solid #0f0;
    border-radius: 8px;
    margin: 20px auto;
    display: inline-block;
    animation: ipGlow 1s infinite alternate;
}

@keyframes ipGlow {
    from { box-shadow: 0 0 10px #0f0; }
    to { box-shadow: 0 0 30px #0f0, 0 0 50px #0f0; }
}

.prank-label {
    color: #888;
    margin-right: 10px;
}

.prank-ip-value {
    color: #0f0;
    font-weight: bold;
}

.prank-fake-data {
    margin: 30px 0;
    font-size: 18px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    line-height: 2;
}

.prank-reveal {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #333;
    animation: revealFadeIn 1s ease 3s both;
}

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

.prank-reveal p {
    font-size: 28px;
    color: #ffd700;
    margin-bottom: 10px;
}

.prank-small {
    font-size: 16px !important;
    color: #888 !important;
    margin-bottom: 20px !important;
}

.prank-close-btn {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b35, #ff8c5a);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 20px;
}

.prank-close-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

/* Matrix-like background effect */
.prank-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px
        );
    pointer-events: none;
    animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
    from { background-position: 0 0; }
    to { background-position: 0 4px; }
}

@media (max-width: 768px) {
    .prank-glitch {
        font-size: 36px;
    }

    .prank-skull {
        font-size: 80px;
    }

    .prank-subtitle {
        font-size: 20px;
        letter-spacing: 4px;
    }

    .prank-ip {
        font-size: 16px;
        padding: 10px 20px;
    }

    .prank-fake-data {
        font-size: 14px;
    }

    .prank-reveal p {
        font-size: 20px;
    }
}
