@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Oswald:wght@700&display=swap');

:root {
    --color-super-legendary: #000;
    --color-legendary: #ffc107;
    --color-epic: #9c27b0;
    --color-rare: #2196f3;
    --color-unusual: #3498db;
    --color-common: #a4a4a4;
    --color-background: #121212;
    --color-text: #e0e0e0;
    --color-button: #4caf50;
    --color-button-hover: #43a047;
    --color-button-shadow: rgba(76, 175, 80, 0.4);
    --color-indicator: #ff0055;
    --color-card-bg: rgba(255, 255, 255, 0.05);
    --color-card-border: rgba(255, 255, 255, 0.1);
    --color-card-shadow: rgba(0, 0, 0, 0.5);
    --color-card-shine: rgba(255, 255, 255, 0.15);
    --color-nav-bg: rgba(18, 18, 18, 0.9);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--color-background);
    background-image: radial-gradient(circle, #222 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--color-text);
    min-height: 100vh;
}

.main-header {
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    border-bottom: 1px solid #4caf50;
    border-radius: 0 0 10px 10px;
    min-height: 45px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.main-header.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.logo-section h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3em;
    margin: 0;
    background: linear-gradient(45deg, #4caf50, #81c784, #4caf50);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

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

.nav-menu {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 0.75em;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-menu a:hover {
    background: linear-gradient(45deg, #4caf50, #66bb6a);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.balance-info {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    color: #000;
    backdrop-filter: blur(10px);
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.4);
    border: 1px solid #fff;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.balance-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.6);
}

.balance-info span {
    color: #000;
    font-size: 1em;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Отдельный баланс в правом верхнем углу */
.floating-balance {
    position: fixed;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    color: #000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.5);
    border: 1px solid #fff;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1000;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.floating-balance:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.7);
}

.floating-balance span {
    color: #000;
    font-size: 0.9em;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Модальное окно пополнения баланса */
.topup-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.topup-modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    border: 2px solid #ffc107;
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.topup-modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.topup-modal-header h2 {
    color: #ffc107;
    font-size: 1.8em;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.topup-modal-header p {
    color: #ccc;
    margin: 10px 0 0 0;
    font-size: 0.9em;
}

.topup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ffc107;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.topup-close:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

.topup-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.topup-method {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.topup-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
    border-color: #ff9800;
}

.topup-method.selected {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.6);
}

.topup-method-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    display: block;
}

.topup-method-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.topup-method-desc {
    font-size: 0.8em;
    opacity: 0.8;
}

.topup-amount-section {
    margin-bottom: 25px;
}

.topup-amount-label {
    color: #ffc107;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.topup-amount-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ffc107;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.1em;
    text-align: center;
    transition: all 0.3s ease;
}

.topup-amount-input:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

.topup-amount-input::placeholder {
    color: #999;
}

.topup-quick-amounts {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.topup-quick-amount {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid #ffc107;
    color: #ffc107;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.topup-quick-amount:hover {
    background: #ffc107;
    color: #000;
    transform: scale(1.05);
}

.topup-buttons {
    display: flex;
    gap: 15px;
}

.topup-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.topup-btn-confirm {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.topup-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.topup-btn-cancel {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.topup-btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

.topup-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 100px;
    padding-bottom: 50px;
}

.content-section {
    width: 100%;
    min-height: calc(100vh - 150px);
    padding-top: 20px;
}

h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5em;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.case-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 30px 0;
    max-width: 1000px;
    margin: 0 auto;
}

.case-card {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid #4caf50;
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), transparent);
    transition: left 0.6s ease;
}

.case-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #8bc34a, #4caf50);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.case-card:hover::after {
    transform: scaleX(1);
}

.case-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 50px rgba(76, 175, 80, 0.4);
    border-color: #8bc34a;
}

.case-card img {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 18px;
    margin-bottom: 20px;
    border: 2px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
}

.case-card:hover img {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
}

.case-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.9em;
    margin: 15px 0;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.case-card:hover h3 {
    color: #4caf50;
    text-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
}

.case-card p {
    font-size: 1.4em;
    font-weight: bold;
    color: #ffc107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    transition: all 0.3s ease;
}

.case-card:hover p {
    color: #ffeb3b;
    text-shadow: 0 0 15px rgba(255, 235, 59, 0.7);
}

.roulette-section {
    display: none;
    width: 100%;
}

.roulette-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(26, 26, 26, 0.6));
    border-radius: 25px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 15px 40px rgba(76, 175, 80, 0.2);
    margin-bottom: 40px;
    border: 3px solid #4caf50;
    position: relative;
}

.roulette-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #8bc34a, #4caf50);
}

.roulette-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #4caf50, transparent);
    z-index: 10;
}

.roulette-items {
    display: flex;
    height: 100%;
    align-items: center;
    transition: transform 6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.item-card {
    min-width: 220px;
    height: 220px;
    margin: 0 12px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 3px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    backdrop-filter: blur(5px);
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.item-card.super-legendary { background: var(--color-super-legendary); }
.item-card.legendary { background: var(--color-legendary); }
.item-card.epic { background: var(--color-epic); }
.item-card.rare { background: var(--color-rare); }
.item-card.unusual { background: var(--color-unusual); }
.item-card.common { background: var(--color-common); }

.item-gif {
    width: 130px;
    height: 130px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.6));
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.item-card:hover .item-gif {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.item-name {
    font-size: 1.4em;
    font-weight: bold;
    margin-top: 12px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

.item-card:hover .item-name {
    transform: translateY(-2px);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.item-price {
    font-size: 1.2em;
    margin-top: 8px;
    color: #ffc107;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

.item-card:hover .item-price {
    transform: translateY(-2px);
    color: #ffeb3b;
    text-shadow: 0 4px 12px rgba(255, 235, 59, 0.5);
}

.indicator {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--color-indicator);
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 15px var(--color-indicator);
}

.open-button {
    padding: 25px 60px;
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #4caf50, #66bb6a, #4caf50);
    background-size: 200% 200%;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 30px auto;
    display: block;
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
}

.open-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.open-button:hover::before {
    left: 100%;
}

.open-button:hover {
    background: linear-gradient(135deg, #43a047, #5cb85c, #43a047);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 45px rgba(76, 175, 80, 0.6);
}

.open-button:active {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.5);
}

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

.back-button {
    padding: 10px 25px;
    font-size: 1.1em;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    width: 100%;
    padding: 25px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 20px;
    border: 2px solid #4caf50;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #8bc34a, #4caf50);
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #4caf50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.8);
}

.profile-info {
    text-align: left;
    flex: 1;
    position: relative;
    z-index: 1;
}

.profile-info p {
    font-size: 1.1em;
    margin: 8px 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-info p::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4caf50;
    border-radius: 50%;
    flex-shrink: 0;
}

.best-drop-section {
    padding: 25px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 20px;
    border: 2px solid #4caf50;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
    position: relative;
    overflow: hidden;
}

.best-drop-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #8bc34a, #4caf50);
}

.best-drop-section h3 {
    color: #4caf50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4em;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.best-drop-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.best-drop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(139, 195, 74, 0.1));
    border: 2px solid #4caf50;
    border-radius: 18px;
    max-width: 220px;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.best-drop-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4caf50, #8bc34a, #4caf50);
}

.best-drop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.5);
}

.best-drop-item img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 2px solid #4caf50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.best-drop-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.best-drop-item .item-name {
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.best-drop-item .item-rarity {
    color: #4caf50;
    font-size: 1em;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.best-drop-item .item-price {
    color: #ffc107;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.no-drop-message {
    color: #888;
    font-style: italic;
    text-align: center;
}

/* Топ игроков */
.top-players-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 15px;
    border: 2px solid #4caf50;
}

.top-players-section h3 {
    color: #4caf50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
}

.top-players-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.top-player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    border-radius: 4px;
    border: 1px solid #4caf50;
    transition: all 0.3s ease;
    font-size: 0.75em;
    min-height: 35px;
}

.top-player-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.top-player-item.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    border-color: #ffd700;
}

.top-player-item.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
    border-color: #c0c0c0;
}

.top-player-item.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #000;
    border-color: #cd7f32;
}

.player-rank {
    font-size: 1em;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.player-info {
    flex: 1;
    margin-left: 6px;
}

.player-name {
    font-weight: bold;
    font-size: 0.8em;
    margin-bottom: 0px;
    line-height: 1.2;
}

.player-stats {
    font-size: 0.7em;
    opacity: 0.8;
    line-height: 1.1;
}

.player-earnings {
    text-align: right;
    font-weight: bold;
    font-size: 0.75em;
    color: #ffc107;
}

.top-player-item.rank-1 .player-earnings,
.top-player-item.rank-2 .player-earnings,
.top-player-item.rank-3 .player-earnings {
    color: #000;
}

.no-players-message {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.profile-info span {
    font-weight: bold;
    color: var(--color-button);
}

.inventory-section {
    display: none;
}

.profile-section {
    display: none;
}

.top-section {
    display: none;
}

.top-players-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    justify-items: center;
    padding-top: 20px;
}

.item-list-card {
    width: 100%;
    height: auto;
    min-height: 180px;
    padding: 15px;
    box-sizing: border-box;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 2px solid var(--color-card-border);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--color-card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-list-card.super-legendary { background: linear-gradient(135deg, #000, #333); }
.item-list-card.legendary { background: linear-gradient(135deg, #ffc107, #d4a71c); }
.item-list-card.epic { background: linear-gradient(135deg, #9c27b0, #7b1fa2); }
.item-list-card.rare { background: linear-gradient(135deg, #2196f3, #1976d2); }
.item-list-card.unusual { background: linear-gradient(135deg, #3498db, #2980b9); }
.item-list-card.common { background: linear-gradient(135deg, #a4a4a4, #8c8c8c); }

.item-list-card .item-gif {
    width: 80px;
    height: 80px;
}

.item-list-card .item-name {
    font-size: 1em;
    font-weight: bold;
    margin-top: 5px;
}

.item-list-card .item-price {
    font-size: 0.9em;
    margin-top: 2px;
}

/* Модальное окно для выигрыша */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.5s;
}

.modal-content {
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    animation: zoomIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border: 3px solid #fff;
    max-width: 90%;
    max-height: 90%;
}

.modal-super-legendary {
    background: linear-gradient(135deg, #000, #333);
    border-color: #ff0055;
}

.modal-legendary {
    background: linear-gradient(135deg, #ffc107, #d4a71c);
    border-color: #ffc107;
}

.modal-epic {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border-color: #9c27b0;
}

.modal-rare {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border-color: #2196f3;
}

.modal-unusual {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: #3498db;
}

.modal-common {
    background: linear-gradient(135deg, #a4a4a4, #8c8c8c);
    border-color: #a4a4a4;
}

.modal-content .item-gif {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.modal-content p {
    font-size: 1.5em;
    margin: 10px 0;
    font-weight: 500;
    color: #fff;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 12px 25px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 140px;
}

.modal-btn-sell {
    min-width: 180px;
}

.modal-btn-inventory {
    background: linear-gradient(45deg, #4caf50, #66bb6a);
    color: #fff;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.modal-btn-inventory:hover {
    background: linear-gradient(45deg, #43a047, #5cb85c);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.6);
}

.modal-btn-sell {
    background: linear-gradient(45deg, #ff9800, #ffb74d);
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.modal-btn-sell:hover {
    background: linear-gradient(45deg, #f57c00, #ff9800);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.6);
}

.modal-btn:active {
    transform: scale(0.95);
}

/* Модальное окно для предметов в инвентаре */
.inventory-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.5s;
}

.inventory-modal-content {
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    animation: zoomIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border: 3px solid #fff;
    max-width: 90%;
    max-height: 90%;
}

.inventory-modal-content .item-gif {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.inventory-modal-content h2 {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.inventory-modal-content p {
    font-size: 1.5em;
    margin: 10px 0;
    font-weight: 500;
    color: #fff;
}

.inventory-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s;
    z-index: 10;
}

.inventory-modal-close:hover {
    transform: scale(1.2) rotate(90deg);
    color: #ff0055;
}

.inventory-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.inventory-modal-btn {
    padding: 12px 25px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 140px;
}

.inventory-modal-btn-sell {
    background: linear-gradient(45deg, #ff9800, #ffb74d);
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
    min-width: 180px;
}

.inventory-modal-btn-sell:hover {
    background: linear-gradient(45deg, #f57c00, #ff9800);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.6);
}

.inventory-modal-btn-withdraw {
    background: linear-gradient(45deg, #e91e63, #f06292);
    color: #fff;
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
    min-width: 180px;
}

.inventory-modal-btn-withdraw:hover {
    background: linear-gradient(45deg, #c2185b, #e91e63);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.6);
}

.inventory-modal-btn:active {
    transform: scale(0.95);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    transform: scale(1.2) rotate(90deg);
    color: #ff0055;
}

.win-animation {
    animation: winPulse 2s ease-in-out infinite;
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes zoomIn {
    from { transform: scale(0.5) rotate(-10deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 10px;
        padding: 8px 10px;
        min-height: auto;
    }

    .nav-menu {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 3px 6px;
    }

    .nav-menu a {
        font-size: 0.7em;
        padding: 4px 8px;
    }

    .logo-section h1 {
        font-size: 1.2em;
    }

    .balance-info {
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .balance-info span {
        font-size: 0.9em;
    }

    /* Отключаем скрытие сайдбара на мобильных устройствах */
    .main-header {
        transform: translateY(0) !important;
    }

    /* Мобильная адаптация для плавающего баланса */
    .floating-balance {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 0.7em;
    }

    .floating-balance span {
        font-size: 0.8em;
    }

    h1 {
        font-size: 2.5em;
    }

    .case-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0;
    }

    .case-card {
        padding: 20px;
    }

    .roulette-container {
        height: 180px;
    }

    .item-card {
        min-width: 120px;
        height: 160px;
        margin: 0 6px;
    }

    .item-gif {
        width: 70px;
        height: 70px;
    }

    .open-button {
        padding: 15px 30px;
        font-size: 1.3em;
        width: 100%;
        max-width: 350px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-picture {
        width: 80px;
        height: 80px;
    }

    /* Мобильная адаптация модального окна */
    .modal-content {
        padding: 20px;
        margin: 20px;
        max-width: calc(100vw - 40px);
    }

    .modal-content .item-gif {
        width: 150px;
        height: 150px;
    }

    .modal-content h2 {
        font-size: 2em;
    }

    .modal-content p {
        font-size: 1.2em;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 28px;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .modal-btn {
        font-size: 1em;
        padding: 10px 20px;
        min-width: 120px;
    }

    .modal-btn-sell {
        min-width: 150px;
    }

    /* Мобильная адаптация модального окна инвентаря */
    .inventory-modal-content {
        padding: 20px;
        margin: 20px;
        max-width: calc(100vw - 40px);
    }

    .inventory-modal-content .item-gif {
        width: 150px;
        height: 150px;
    }

    .inventory-modal-content h2 {
        font-size: 2em;
    }

    .inventory-modal-content p {
        font-size: 1.2em;
    }

    .inventory-modal-close {
        top: 10px;
        right: 15px;
        font-size: 28px;
    }

    .inventory-modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .inventory-modal-btn {
        font-size: 1em;
        padding: 10px 20px;
        min-width: 120px;
    }

    .inventory-modal-btn-sell,
    .inventory-modal-btn-withdraw {
        min-width: 150px;
    }

    /* Мобильная адаптация для лучшего дропа */
    .best-drop-section {
        margin-top: 20px;
        padding: 15px;
    }

    .best-drop-section h3 {
        font-size: 1.3em;
    }

    .best-drop-item {
        max-width: 150px;
        padding: 10px;
        background: rgba(76, 175, 80, 0.1);
        border: 2px solid #4caf50;
        border-radius: 12px;
        box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
    }

    .best-drop-item img {
        width: 60px;
        height: 60px;
    }

    .best-drop-item .item-name {
        font-size: 1em;
    }

    /* Мобильная адаптация топа игроков */
    .top-players-container {
        padding: 10px;
    }

    .top-players-section {
        margin-top: 20px;
        padding: 15px;
    }

    .top-players-section h3 {
        font-size: 1.3em;
    }

    .top-player-item {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .player-rank {
        font-size: 1.2em;
        min-width: auto;
    }

    .player-info {
        margin-left: 0;
        width: 100%;
    }

    .player-name {
        font-size: 1em;
    }

    .player-stats {
        font-size: 0.8em;
    }

    .player-earnings {
        text-align: left;
        font-size: 1.1em;
        align-self: flex-end;
    }

    /* Мобильная адаптация модального окна пополнения */
    .topup-modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
        max-width: none;
    }

    .topup-methods {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .topup-method {
        padding: 15px;
    }

    .topup-method-icon {
        font-size: 2em;
    }

    .topup-method-name {
        font-size: 1em;
    }

    .topup-method-desc {
        font-size: 0.7em;
    }

    .topup-quick-amounts {
        flex-wrap: wrap;
        gap: 8px;
    }

    .topup-quick-amount {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .topup-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .topup-btn {
        padding: 12px;
        font-size: 1em;
    }
}

/* Дополнительные стили для мобильной адаптации профиля */
@media (max-width: 768px) {
    /* Улучшение навигации - только для профиля */
    .nav-menu a {
        font-size: 0.7em;
        padding: 4px 8px;
    }
    
    /* Улучшение плавающего баланса */
    .floating-balance {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    /* Улучшение админ кнопки */
    #admin-button {
        top: 5px;
        left: 5px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Улучшение модальных окон */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.3em;
    }
}

/* Стили для очень маленьких экранов */
@media (max-width: 480px) {
    .nav-menu a {
        font-size: 0.65em;
        padding: 3px 6px;
    }
    
    .floating-balance {
        top: 8px;
        right: 8px;
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    #admin-button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5px;
        padding: 15px;
    }
}

/* Улучшение для touch устройств */
@media (hover: none) and (pointer: coarse) {
    .action-btn,
    .topup-btn,
    .stat-card {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .achievement-item {
        min-height: 44px;
    }
    
    .modal-close {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============ НОВЫЕ СТИЛИ ДЛЯ КЕЙСОВ ============ */

/* Лента последних открытий */
.recent-openings-bar {
    background: rgba(30, 30, 50, 0.8);
    padding: 10px 15px;
    margin: -20px -20px 20px -20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

.recent-label {
    font-size: 13px;
    color: #667eea;
    font-weight: bold;
    flex-shrink: 0;
}

.recent-openings-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.recent-item {
    background: rgba(40, 40, 70, 0.6);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    flex-shrink: 0;
    border-left: 3px solid #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideInRight 0.3s;
}

.recent-item.legendary { border-left-color: #ffc107; background: rgba(255, 193, 7, 0.1); }
.recent-item.epic { border-left-color: #9c27b0; background: rgba(156, 39, 176, 0.1); }
.recent-item.rare { border-left-color: #2196f3; background: rgba(33, 150, 243, 0.1); }
.recent-item.common { border-left-color: #6b7280; background: rgba(107, 114, 128, 0.1); }

.recent-user {
    color: #667eea;
    font-weight: bold;
}

.recent-prize {
    color: #fbbf24;
}

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

/* Панель активности inline */
.activity-panel-inline {
    background: rgba(30, 30, 50, 0.6);
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.activity-panel-inline h3 {
    font-size: 15px;
    color: #667eea;
    margin-bottom: 12px;
    text-align: center;
}

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

.activity-item-inline {
    background: rgba(40, 40, 70, 0.5);
    border-left: 3px solid #667eea;
    padding: 10px 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    transition: all 0.2s;
}

.activity-item-inline:hover {
    background: rgba(50, 50, 80, 0.6);
    transform: translateX(3px);
}

.activity-user-inline {
    font-weight: bold;
    color: #fff;
}

.activity-case-inline {
    color: #667eea;
}

.activity-time-inline {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

/* Результат открытия inline */
.win-result-inline {
    margin-top: 30px;
    text-align: center;
    animation: winAppear 0.5s;
}

.win-item-inline {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #667eea;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
}

.win-item-inline img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    animation: pulse 2s infinite;
}

.win-item-inline h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #fff;
}

.win-price-inline {
    font-size: 28px;
    color: #fbbf24;
    font-weight: bold;
}

@keyframes winAppear {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Мобильная адаптация для новых элементов */
@media (max-width: 768px) {
    .recent-openings-bar {
        padding: 8px 12px;
        margin: -15px -15px 15px -15px;
    }
    
    .recent-label {
        font-size: 11px;
    }
    
    .recent-item {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .activity-panel-inline {
        padding: 12px;
        max-height: 200px;
    }
    
    .activity-panel-inline h3 {
        font-size: 13px;
    }
    
    .activity-item-inline {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .win-item-inline {
        padding: 20px;
    }
    
    .win-item-inline img {
        width: 140px;
        height: 140px;
    }
    
    .win-item-inline h3 {
        font-size: 18px;
    }
    
    .win-price-inline {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .recent-label {
        font-size: 10px;
    }
    
    .recent-item {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .activity-panel-inline h3 {
        font-size: 12px;
    }
    
    .activity-item-inline {
        font-size: 11px;
    }
    
    .win-item-inline img {
        width: 120px;
        height: 120px;
    }
    
    .win-item-inline h3 {
        font-size: 16px;
    }
    
    .win-price-inline {
        font-size: 20px;
    }
}
