/* ===== Ban Screen ===== */
.ban-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 0, 0, 0.15), rgba(139, 0, 0, 0.2));
    backdrop-filter: blur(10px);
    z-index: 9998;
    display: none;
    animation: banPulse 3s infinite;
}

@keyframes banPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.9; }
}

.ban-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 3px solid #ff4444;
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 0 60px rgba(255, 0, 0, 0.4);
    max-width: 95vw;
    max-height: 95vh;
    width: min(450px, 95vw);
    display: none;
    animation: banAppear 0.6s ease-out;
}

.ban-container * {
    box-sizing: border-box;
}

@keyframes banAppear {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.ban-icon {
    font-size: 5rem;
    color: #ff4444;
    margin-bottom: 1.5rem;
    animation: shake 2.5s infinite;
    filter: drop-shadow(0 4px 12px rgba(255, 0, 0, 0.4));
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

.ban-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ff6b6b;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 15px rgba(255, 0, 0, 0.4);
    background: linear-gradient(45deg, #ff6b6b, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ban-message {
    font-size: 1.2rem;
    color: #f8fafc;
    margin-bottom: 2rem;
    line-height: 1.6;
    padding: 0 1rem;
}

.ban-details {
    background: rgba(255, 0, 0, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ban-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ban-detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ban-detail-label {
    color: #94a3b8;
    font-weight: 500;
}

.ban-detail-value {
    color: #f8fafc;
    font-weight: 600;
}

.ban-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: #38bdf8;
    margin: 1.5rem 0;
    font-family: 'Space Grotesk', monospace;
    background: rgba(56, 189, 248, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: inline-block;
    border: 2px solid rgba(56, 189, 248, 0.3);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

.ban-permanent {
    font-size: 1.4rem;
    color: #ff8c00;
    font-weight: 700;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 140, 0, 0.15);
    border-radius: 12px;
    border: 2px solid rgba(255, 140, 0, 0.3);
}

.ban-contact {
    font-size: 0.9rem !important;
    color: #94a3b8;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    line-height: 1.4;
    word-wrap: break-word;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .ban-contact {
        font-size: 0.8rem !important;
        padding: 0 0.5rem;
        margin-top: 1rem;
    }
    
    .ban-contact a {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.ban-contact a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.ban-contact a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* ===== Maintenance Screen ===== */
.maintenance-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 140, 0.95);
    z-index: 9998;
    backdrop-filter: blur(10px);
}

.maintenance-overlay.active {
    display: block;
}

.maintenance-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1e3c8c 0%, #2a5298 100%);
    border: 3px solid #4a90e2;
    border-radius: 25px;
    padding: 2rem;
    max-width: 95vw;
    max-height: 95vh;
    width: min(450px, 95vw);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(74, 144, 226, 0.3), inset 0 0 30px rgba(74, 144, 226, 0.1);
    z-index: 9999;
    text-align: center;
    animation: slideDown 0.5s ease-out;
    overflow-y: auto;
    box-sizing: border-box;
}

.maintenance-container * {
    box-sizing: border-box;
    max-width: 100%;
}

.maintenance-container.active {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.maintenance-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    position: relative;
    flex-wrap: wrap;
}

.maintenance-icon-main {
    font-size: 4rem;
    color: #4fc3f7;
    animation: maintenance-rotate 4s linear infinite;
    filter: drop-shadow(0 0 20px rgba(79, 195, 247, 0.5));
}

.maintenance-icon-1 {
    font-size: 2rem;
    opacity: 0.7;
    color: #29b6f6;
    animation: maintenance-float 3s ease-in-out infinite;
}

.maintenance-icon-2 {
    font-size: 2rem;
    opacity: 0.7;
    color: #0288d1;
    animation: maintenance-pulse 2.5s ease-in-out infinite;
}

.maintenance-icon-3 {
    font-size: 2rem;
    opacity: 0.7;
    color: #01579b;
    animation: maintenance-bounce 3.5s ease-in-out infinite;
}

@keyframes maintenance-rotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes maintenance-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(10deg); }
}

@keyframes maintenance-pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

@keyframes maintenance-bounce {
    0%, 100% { transform: translateX(0px); }
    50% { transform: translateX(8px); }
}

.maintenance-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    line-height: 1.2;
}

.maintenance-message {
    color: #e3f2fd;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.maintenance-details {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.maintenance-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
    font-size: 0.9rem;
}

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

.maintenance-detail-label {
    color: #90caf9;
    font-weight: 600;
}

.maintenance-detail-value {
    color: #fff;
    font-weight: 700;
}

.maintenance-detail-icon {
    /* Styling for maintenance detail icons */
}

.maintenance-status-active {
    /* Styling for active status */
}

.maintenance-timer-container {
    margin: 1.5rem 0;
}

.maintenance-timer-label {
    color: #90caf9;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.maintenance-timer-icon {
    /* Styling for timer icon */
}

.maintenance-timer {
    font-size: 2.2rem;
    font-weight: bold;
    color: #4fc3f7;
    margin: 1rem 0;
    text-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    line-height: 1;
}

.maintenance-contact {
    color: #90caf9;
    font-size: 0.85rem;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(74, 144, 226, 0.3);
    line-height: 1.4;
}

.maintenance-contact-icon {
    /* Styling for contact icon */
}

.maintenance-contact a {
    color: #4fc3f7;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.maintenance-contact a:hover {
    color: #80deea;
    text-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

/* Scrollbar */
.maintenance-container {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.maintenance-container::-webkit-scrollbar {
    width: 4px;
}

.maintenance-container::-webkit-scrollbar-track {
    background: transparent;
}

.maintenance-container::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 20px;
}

/* ===== Mobile Only Screen ===== */
.mobile-only-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
    text-align: center;
}

.mobile-only-content {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 400px;
    border: 2px solid var(--primary);
}

.mobile-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.mobile-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.mobile-description {
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.mobile-features {
    text-align: left;
    margin: 1.5rem 0;
}

.mobile-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.mobile-feature span {
    color: var(--primary);
}

.telegram-app-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.telegram-app-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 0.5rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.telegram-app-link:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.loading-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
    animation: logoPulse 2s ease-in-out infinite;
}

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

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

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

.loading-screen p {
    color: var(--text);
    font-size: 1.2rem;
    animation: pulseText 1.5s ease-in-out infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.loaded .loading-screen {
    opacity: 0;
    pointer-events: none;
}

.silka {
    font-size: 20px;
    color: #359df2;
    background-color: #1f72b6;
    border-radius: 5px;
    border-bottom: none;
}

/* ===== Utility Classes ===== */
.dis, .hidden {
    display: none !important;
}

.id {
    margin-right: 10px;
}

/* ===== Responsive Design ===== */
@supports (padding: max(0px)) {
    .glass-panel, .modal-content, .control-modal-content {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    
    .currency-display {
        top: max(10px, env(safe-area-inset-top));
    }
}

/* Tablets */
@media (min-width: 768px) {
    .control-modal-content {
        max-width: 800px;
        width: 90%;
    }
    
    .game-level-badge {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
        letter-spacing: 2px;
    }
}

@media (min-width: 1200px) {
    .control-modal-content {
        max-width: 900px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        overflow: hidden;
    }
    
    .glass-panel {
        padding: 1.5rem;
        border-radius: 16px;
        max-width: 100%;
        margin: 0 auto;
        height: auto;
        min-height: auto;
    }
    
    .score {
        font-size: 3rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .title {
        font-size: 1.5rem !important;
    }
    
    .progress-container {
        margin: 1.5rem 0 !important;
    }
    
    .level-display {
        width: 90% !important;
        min-width: auto !important;
        margin: -1rem auto 1rem !important;
        padding: 1rem !important;
    }
    
    .currency-display {
        top: 10px !important;
        right: 10px !important;
        padding: 0.8rem !important;
        min-width: 100px !important;
        height: 30px !important;
    }
    
    .control-btn {
        bottom: 15px !important;
        left: 15px !important;
        padding: 0.8rem !important;
    }
    .control-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        min-width: unset !important;
        padding: 1rem !important;
        margin: 0 auto;
        overflow-x: hidden !important;
    }
    
    .shop-tabs {
        gap: 0.5rem !important;
        margin: 1rem 0 !important;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .shop-tab {
        padding: 0.8rem 1rem !important;
        font-size: 1rem !important;
        white-space: nowrap;
    }
    
    .shop-item, .shop-item6 {
        padding: 1rem !important;
        min-height: 70px !important;
    }
    
    .item-header {
        gap: 1rem !important;
    }
    
    .item-header img {
        width: 35px !important;
        height: 35px !important;
    }
    
    .vertical-shop {
        max-height: 400px !important;
        padding-right: 0 !important;
    }
    .menu-btn {
        top: 15px !important;
        left: 15px !important;
        padding: 0.8rem !important;
    }
    
    .modal-content, .control-modal-content, .account-modal {
        width: 95% !important;
        max-width: 95% !important;
        margin: 0 auto;
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }
    
    .control-modal-content {
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    .modal-overlay, .control-modal-overlay {
        padding: 0.5rem !important;
    }
    
    .shop-item {
        padding: 1rem !important;
    }
    
    .menu-banner {
        width: 70px !important;
        top: 60px !important;
        left: 15px !important;
    }
    
    .menu-item {
        width: 45px !important;
        height: 45px !important;
    }
    
    .game-level-badge {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .skins-container {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .skin-card {
        padding: 1rem;
    }
    
    .skin-preview {
        width: 60px;
        height: 60px;
    }
    
    .skin-preview .material-symbols-rounded {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .glass-panel {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .coin {
        width: 120px;
        height: 120px;
    }
    
    .score {
        font-size: 2.5rem !important;
        margin: 1rem 0 !important;
    }
    
    .title {
        font-size: 1.3rem !important;
    }
    
    .header {
        margin-bottom: 1rem !important;
    }
    
    .level-display {
        padding: 0.8rem !important;
        margin: -0.8rem auto 0.8rem !important;
    }
    
    .level-item {
        padding: 0.3rem 0.8rem !important;
    }
    
    .level-text1, .level-text2 {
        font-size: 1.4rem !important;
        padding: 6px 12px !important;
    }
    
    .currency-display {
        top: 8px !important;
        right: 8px !important;
        padding: 0.6rem !important;
        gap: 1rem !important;
    }
    
    .currency-item {
        font-size: 1rem !important;
    }
    
    .control-modal-content {
        padding: 1rem;
        width: 98%;
        margin: 0 1%;
    }
    
    .shop-item {
        padding: 1.2rem;
        min-height: 70px;
    }
    
    .item-header {
        gap: 1rem;
    }
    
    .item-header img {
        width: 40px;
        height: 40px;
    }
    
    .shop-tab {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .ban-container, .maintenance-container {
        padding: 1.5rem;
        border-radius: 20px;
        width: 95%;
    }
    
    .ban-icon, .maintenance-icon-main {
        font-size: 3.5rem !important;
    }
    
    .ban-title, .maintenance-title {
        font-size: 1.6rem !important;
        margin-bottom: 1.2rem !important;
    }
    
    .skins-container {
        padding: 1.5rem;
    }
    
    .skin-card {
        width: 140px;
        padding: 1.2rem;
    }
    
    .skin-preview {
        width: 80px;
        height: 80px;
    }
    
    .skin-preview .material-symbols-rounded {
        font-size: 2.5rem;
    }
}
@media (max-width: 480px) {
    .control-modal-content {
        width: 98% !important;
        padding: 0.8rem !important;
        border-radius: 12px !important;
    }
    
    .shop-tab {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
    
    .shop-item {
        padding: 0.8rem !important;
    }
    
    .item-header {
        gap: 0.8rem !important;
    }
    
    .item-header img {
        width: 30px !important;
        height: 30px !important;
    }
    
    .item-price {
        font-size: 1.1rem !important;
    }
    
    .item-price img {
        width: 20px !important;
    }
}
@media (max-width: 360px) {
    .score {
        font-size: 2.2rem !important;
    }
    
    .title {
        font-size: 1.1rem !important;
    }
    
    .glass-panel {
        padding: 0.8rem;
    }
    
    .skin-card {
        width: 130px;
        padding: 1rem;
    }
    
    .skin-preview {
        width: 70px;
        height: 70px;
    }
    
    .ban-container, .maintenance-container {
        padding: 1.2rem;
        border-radius: 18px;
    }
    
    .ban-icon, .maintenance-icon-main {
        font-size: 3rem !important;
    }
    
    .ban-title, .maintenance-title {
        font-size: 1.4rem !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 320px) {
    .control-modal-content {
        padding: 0.8rem;
        border-radius: 0.8rem;
    }
    
    .shop-item {
        padding: 0.6rem;
    }
    
    .item-header img {
        width: 28px;
        height: 28px;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .ban-container, .maintenance-container {
        padding: 1rem;
        border-radius: 16px;
        border-width: 2px;
    }
    
    .ban-icon, .maintenance-icon-main {
        font-size: 2.5rem !important;
    }
}

/* Height-based responsive styles */
@media (max-height: 700px) {
    .floating-message {
        bottom: 100px;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .maintenance-container {
        padding: 1.2rem !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
    }
}

@media (max-height: 500px) {
    .floating-message {
        bottom: 80px;
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .maintenance-container {
        padding: 0.8rem !important;
        max-height: 80vh !important;
        border-radius: 12px !important;
    }
}

@media (max-height: 400px) {
    .floating-message {
        bottom: 60px;
    }
    
    .ban-container, .maintenance-container {
        padding: 0.8rem;
    }
    
    .ban-icon, .maintenance-icon-main {
        font-size: 2rem !important;
        margin-bottom: 0.5rem !important;
    }
}

@media (max-height: 400px) and (orientation: portrait) {
    .ban-container, .maintenance-container {
        padding: 0.8rem;
    }
    
    .ban-icon, .maintenance-icon-main {
        font-size: 2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .ban-title, .maintenance-title {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .ban-message, .maintenance-message {
        font-size: 0.8rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .ban-details, .maintenance-details {
        padding: 0.6rem !important;
        margin-bottom: 0.8rem !important;
    }
}

@media (max-height: 400px) and (orientation: landscape) {
    .maintenance-container {
        max-height: 98vh;
        overflow-y: auto;
    }
    
    .maintenance-icons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Стили для карточек титулов */
.title-card {
    background: linear-gradient(145deg, rgba(46, 52, 64, 0.8), rgba(30, 41, 59, 0.8));
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.title-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.05), transparent);
}

.title-card.unlocked {
    border-color: var(--primary);
    box-shadow: 0 4px 24px rgba(129, 140, 248, 0.2);
}

.title-card.selected {
    background: linear-gradient(45deg, #2d3a5a, #1e293b);
    border-color: #38bdf8;
}

.title-card.locked {
    filter: grayscale(1);
    opacity: 0.5;
    cursor: not-allowed;
}

.title-card:hover:not(.locked) {
    transform: translateY(-2px);
}

.title-name {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(45deg, #fff, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.title-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.title-description {
    color: #94a3b8;
    font-size: 0.9rem;
}

.selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #38bdf8;
    color: #0f172a;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

.selected-title {
    background: linear-gradient(45deg, #38bdf8, #818cf8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}


/* ===== Enhanced Title Cards ===== */
.title-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

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

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

.title-card.unlocked {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(129, 140, 248, 0.3);
}

.title-card.selected {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(30, 41, 59, 0.9));
    border-color: #38bdf8;
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.title-card.locked {
    filter: grayscale(1);
    opacity: 0.6;
    cursor: not-allowed;
}

.title-card:hover:not(.locked) {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

/* Special title effects */
.title-card.admin {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(30, 41, 59, 0.9));
    border-color: #dc2626;
}

.title-card.admin.selected {
    box-shadow: 0 12px 40px rgba(220, 38, 38, 0.4);
    animation: adminGlow 2s ease-in-out infinite alternate;
}

.title-card.tester {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(30, 41, 59, 0.9));
    border-color: #8b5cf6;
}

.title-card.tester.selected {
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
    animation: testerGlow 2s ease-in-out infinite alternate;
}

@keyframes adminGlow {
    from {
        box-shadow: 0 8px 32px rgba(220, 38, 38, 0.3);
    }
    to {
        box-shadow: 0 12px 40px rgba(220, 38, 38, 0.6);
    }
}

@keyframes testerGlow {
    from {
        box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
    }
    to {
        box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6);
    }
}

.title-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.title-name {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.title-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.title-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
}

.badge-tester {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
}

.badge-special {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.badge-default {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    color: white;
}

.title-description {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.title-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffd700;
}

.title-price img {
    width: 20px;
    height: 20px;
}

.owned-badge {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.selected-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #38bdf8;
    color: #0f172a;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(56, 189, 248, 0.4);
}

/* Title rarity indicators */
.rarity-indicator {
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 4px 0 0 4px;
}

.rarity-common { background: #6b7280; }
.rarity-rare { background: #3b82f6; }
.rarity-epic { background: #8b5cf6; }
.rarity-legendary { background: #f59e0b; }
.rarity-mythic { background: #ef4444; }



/* ===== Leaderboard Styles ===== */
.leaderboard-container {
    max-height: none !important; /* Убираем ограничение высоты */
    height: auto !important; /* Автоматическая высота */
    overflow-y: visible !important; /* Убираем прокрутку */
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
}

.leaderboard-item {
    flex-shrink: 1; /* Разрешаем уменьшение */
    min-height: 50px; /* Минимальная высота элемента */
    transition: all 0.3s ease; /* Плавное изменение размера */
}
.leaderboard-container::-webkit-scrollbar {
    width: 6px;
}

.leaderboard-container::-webkit-scrollbar-track {
    background: transparent;
}

.leaderboard-container::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 20px;
}
/* ===== Leaderboard Styles ===== */

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: 12px;
    margin-bottom: 0.8rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Места на пьедестале */
.leaderboard-item.gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(30, 41, 59, 0.8));
    border-color: #FFD700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.leaderboard-item.silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(30, 41, 59, 0.8));
    border-color: #C0C0C0;
    box-shadow: 0 4px 20px rgba(192, 192, 192, 0.3);
}

.leaderboard-item.bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(30, 41, 59, 0.8));
    border-color: #CD7F32;
    box-shadow: 0 4px 20px rgba(205, 127, 50, 0.3);
}

.leaderboard-rank {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.leaderboard-rank.gold {
    background: linear-gradient(135deg, #FFD700, #FFAA00);
    color: #8B6508;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.leaderboard-rank.silver {
    background: linear-gradient(135deg, #C0C0C0, #808080);
    color: #2c2c2c;
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.4);
}

.leaderboard-rank.bronze {
    background: linear-gradient(135deg, #CD7F32, #A65E00);
    color: white;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.4);
}

.leaderboard-rank.other {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.leaderboard-player-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.leaderboard-name {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leaderboard-title {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    display: inline-block;
}

.leaderboard-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.leaderboard-coins {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffd700;
}

.leaderboard-coins img {
    width: 24px;
    height: 24px;
}

.leaderboard-level {
    font-size: 0.9rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
}

.leaderboard-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #94a3b8;
}

.leaderboard-empty .material-symbols-rounded {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.leaderboard-title-admin {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.leaderboard-title-tester {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.leaderboard-title-special {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.leaderboard-title-default {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

/* ===== Адаптивный Leaderboard ===== */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
    gap: 0.8rem;
}

.leaderboard-player-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0; /* Важно для обрезки текста */
    overflow: hidden;
}

.leaderboard-name {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.leaderboard-title {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: fit-content;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-stats {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
    flex-shrink: 0;
    min-width: fit-content;
}

.leaderboard-coins {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffd700;
    white-space: nowrap;
}

.leaderboard-coins img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.leaderboard-rank {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    .leaderboard-item {
        padding: 0.6rem;
        gap: 0.5rem;
        min-height: 50px;
    }
    
    .leaderboard-name {
        font-size: 0.9rem;
    }
    
    .leaderboard-title {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
    
    .leaderboard-coins {
        font-size: 0.8rem;
        gap: 0.3rem;
    }
    
    .leaderboard-coins img {
        width: 16px;
        height: 16px;
    }
    
    .leaderboard-rank {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        margin-right: 0.3rem;
    }
    
    .leaderboard-stats {
        gap: 0.5rem;
    }
}

@media (max-width: 360px) {
    .leaderboard-name {
        font-size: 0.8rem;
    }
    
    .leaderboard-coins {
        font-size: 0.75rem;
    }
    
    .leaderboard-coins img {
        width: 14px;
        height: 14px;
    }
    
    .leaderboard-title {
        font-size: 0.65rem;
    }
}

/* Стили для очень длинных имен */
.leaderboard-name-long {
    font-size: 0.85rem !important;
}

.leaderboard-coins-compact {
    font-size: 0.75rem !important;
}

.leaderboard-coins-compact img {
    width: 14px !important;
    height: 14px !important;
}

/* Стили для модального окна невалидного токена */
.invalid-token-warning {
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid #ff6b6b;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.invalid-token-warning .material-symbols-rounded {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}


/* Стили для модального окна рестарта */
.restart-icon-container {
    position: relative;
}

.restart-particles::before,
.restart-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: particle-float 3s ease-in-out infinite;
}

.restart-particles::before {
    top: -10px;
    left: 20px;
    animation-delay: 0s;
}

.restart-particles::after {
    top: 10px;
    right: 15px;
    animation-delay: 1.5s;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0;
    }
    50% {
        transform: translateY(-15px) scale(1.2);
        opacity: 1;
    }
}

/* Анимация пульсации для иконки */
@keyframes pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(90deg);
    }
    50% {
        transform: scale(1.05) rotate(180deg);
    }
    75% {
        transform: scale(1.1) rotate(270deg);
    }
}

/* Эффект блеска для кнопки */
.button-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.8s ease;
}

.modal-btn.confirm-btn:hover .button-shine {
    left: 100%;
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .modal-actions {
        flex-direction: column;
    }
    
    .bonus-section > div {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 1rem;
    }
}






