/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* Loading Screen */
#loading-screen {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    justify-content: center;
    align-items: center;
}

.loading-container {
    text-align: center;
    max-width: 300px;
    width: 90%;
}

#loading-animation {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: var(--accent-color);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.loading-container h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: var(--secondary-bg);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--button-primary), var(--button-hover));
    width: 0%;
    transition: width 0.3s ease;
}

/* Welcome Screen */
#welcome-screen {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    position: relative;
    overflow: hidden;
}

#welcome-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.welcome-container {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.welcome-container h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--button-primary), #e94560);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-container p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.welcome-features {
    margin: 2rem 0;
}

.feature {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    padding: 1.2rem;
    background: rgba(22, 33, 62, 0.8);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.2);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-2px);
    border-color: rgba(74, 144, 226, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 1.8rem;
    margin-right: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

#start-playing-btn {
    background: linear-gradient(135deg, var(--button-primary), #357abd);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

#start-playing-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#start-playing-btn:hover::before {
    left: 100%;
}

#start-playing-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Menu Screen */
.menu-container {
    padding: 1rem;
    max-width: 400px;
    margin: 0 auto;
    overflow-y: auto;
    height: calc(100vh - 80px);
    /* Account for bottom navigation */
}

#menu-screen {
    overflow-y: auto;
    height: 100vh;
}

.menu-header {
    text-align: center;
    margin-bottom: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--secondary-bg);
    border-radius: 15px;
}

.user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
}

.user-balance {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    align-items: center;
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
}

.balance-refresh {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.balance-refresh:hover {
    color: var(--button-primary);
    transform: rotate(180deg);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-button {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    background: var(--secondary-bg);
    border: none;
    border-radius: 20px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.menu-button::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;
}

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

.menu-button:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.menu-button.primary {
    background: linear-gradient(135deg, var(--button-primary), #357abd);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

.menu-button.primary:hover {
    background: linear-gradient(135deg, #357abd, var(--button-primary));
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
}

.button-icon {
    font-size: 1.8rem;
    margin-right: 1.2rem;
    width: 40px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.button-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.button-text {
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.3rem;
}

.button-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    opacity: 0.8;
}

/* Screen Header */
.screen-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--secondary-bg);
    margin-bottom: 1rem;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    margin-right: 1rem;
}

/* Tournaments Screen */
#tournaments-screen {
    overflow-y: auto;
    height: 100vh;
}

.tournaments-container {
    padding: 1rem;
    height: calc(100vh - 80px);
    /* Account for bottom navigation */
    overflow-y: auto;
}

.tournament-card {
    background: var(--secondary-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--button-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tournament-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.tournament-card.paid {
    border-left-color: #ffd700;
    background: linear-gradient(135deg, var(--secondary-bg) 0%, rgba(255, 215, 0, 0.1) 100%);
}

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

.tournament-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 0;
}

.tournament-description {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.tournament-description p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.tournament-status {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.tournament-status.active {
    background: var(--success-color);
    color: white;
}

.tournament-status.ongoing {
    background: #f97316;
    color: white;
}

.tournament-status.finished {
    background: #6b7280;
    color: white;
}

.tournament-info {
    margin-bottom: 1rem;
}

.tournament-info>div {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tournament-prize {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tournament-prize .prize-label {
    font-weight: 600;
    color: var(--text-primary);
}

.prize-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--button-primary);
}

.tournament-participants,
.tournament-time {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.tournament-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tournament-join-btn {
    flex: 1;
    background: var(--button-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tournament-join-btn:hover:not(.disabled) {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.tournament-join-btn.disabled {
    background: #6b7280;
    color: #9ca3af;
    cursor: not-allowed;
}

.tournament-status-btn {
    padding: 0.8rem 1rem;
    background: transparent;
    color: var(--button-primary);
    border: 1px solid var(--button-primary);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tournament-status-btn:hover {
    background: var(--button-primary);
    color: white;
}

.loading-message,
.error-message,
.no-tournaments {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.error-message {
    color: #ef4444;
}

.join-tournament-btn.premium {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

/* Profile Screen */
#profile-screen {
    overflow-y: auto;
    height: 100vh;
}

.profile-container {
    padding: 1rem;
    height: calc(100vh - 80px);
    /* Account for bottom navigation */
    overflow-y: auto;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--secondary-bg);
    border-radius: 15px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--button-primary);
    margin-right: 1rem;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.profile-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-actions-mini {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.action-btn-mini {
    padding: 6px 12px;
    background: var(--button-primary);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.action-btn-mini:hover {
    background: var(--button-hover);
    transform: translateY(-1px);
}

.action-btn-mini:active {
    transform: translateY(0);
}

/* Profile Stats Row (compact) */
.profile-stats-row {
    display: flex;
    justify-content: space-around;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-item .stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-item .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Balance Section */
.balance-section {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.balance-card {
    flex: 1;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--button-primary);
    border-radius: 50%;
}

.balance-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.balance-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
}

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

.balance-usd {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Profile Actions */
.profile-actions {
    margin-top: 20px;
    text-align: center;
}

.topup-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Achievements Section */
.achievements-section {
    margin-top: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
}

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

.achievements-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0;
}

.achievements-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--accent-color);
    padding: 4px 12px;
    border-radius: 12px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.achievement-card {
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.achievement-card.unlocked {
    border-color: var(--success-color);
    background: linear-gradient(135deg, var(--secondary-bg) 0%, rgba(76, 175, 80, 0.1) 100%);
}

.achievement-card.unlocked::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 20px 20px 0;
    border-color: transparent var(--success-color) transparent transparent;
}

.achievement-card.unlocked::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.achievement-card.unlocked .achievement-icon {
    filter: grayscale(0%);
    opacity: 1;
}

.achievement-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.2;
}

.achievement-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
    margin-bottom: 8px;
}

.achievement-progress {
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.achievement-progress-bar {
    height: 100%;
    background: var(--button-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.achievement-card.unlocked .achievement-progress-bar {
    background: var(--success-color);
}

.achievement-reward {
    font-size: 0.7rem;
    color: var(--warning-color);
    margin-top: 4px;
    font-weight: 600;
}

/* Level Section */
.level-section {
    margin-top: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.level-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.level-icon {
    font-size: 2.5rem;
}

.level-details h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.level-details p {
    margin: 4px 0 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.level-progress {
    width: 100%;
    height: 8px;
    background: var(--accent-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.level-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--button-primary), var(--success-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.level-progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Referral Screen */
#referral-screen {
    overflow-y: auto;
    height: 100vh;
}

.referral-container {
    padding: 1rem;
    height: calc(100vh - 80px);
    /* Account for bottom navigation */
    overflow-y: auto;
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.referral-info {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 2rem;
}

.referral-info h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.info-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    background: var(--secondary-bg);
    border-radius: 10px;
}

.point-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.referral-link-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 2rem;
}

.referral-link-section h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.referral-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.referral-link-input {
    flex: 1;
    padding: 12px;
    background: var(--secondary-bg);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: monospace;
}

.copy-btn {
    padding: 12px 15px;
    background: var(--button-primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--button-hover);
    transform: scale(1.05);
}

.share-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--success-color), #45a049);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.referral-history {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 2rem;
}

.referral-history h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.history-empty small {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--secondary-bg);
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

.history-item.pending {
    border-left-color: #FF9800;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-info .amount {
    font-weight: bold;
    color: #4CAF50;
}

.history-info .source {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.history-status .status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #4CAF50;
    color: white;
}

.history-item.pending .history-status .status {
    background: #FF9800;
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-amount {
    font-weight: bold;
    color: var(--success-color);
}

.history-source {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.aml-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 2rem;
}

.aml-warning h4 {
    margin: 0 0 10px 0;
    color: var(--warning-color);
    font-size: 1rem;
}

.aml-warning p {
    margin: 8px 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.aml-warning ul {
    margin: 10px 0;
    padding-left: 20px;
}

.aml-warning li {
    margin: 5px 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Old Profile Stats (keep for compatibility) */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
}

.profile-actions {
    margin-top: 1rem;
}

.profile-action-btn {
    width: 100%;
    background: var(--button-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-action-btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

/* Help Screen */
#help-screen {
    overflow-y: auto;
    height: 100vh;
}

.help-container {
    padding: 1rem;
    height: calc(100vh - 80px);
    /* Account for bottom navigation */
    overflow-y: auto;
}

.help-section {
    background: var(--secondary-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.help-section h3 {
    color: var(--button-primary);
    margin-bottom: 1rem;
}

.help-steps {
    margin: 1rem 0;
}

.help-step {
    display: flex;
    align-items: flex-start;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--accent-color);
    border-radius: 10px;
}

.step-number {
    background: var(--button-primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.strategy-tips {
    margin: 1rem 0;
}

.tip {
    display: flex;
    align-items: center;
    margin: 0.8rem 0;
    padding: 0.8rem;
    background: var(--accent-color);
    border-radius: 8px;
}

.tip-icon {
    font-size: 1.2rem;
    margin-right: 0.8rem;
}

.game-modes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.mode-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--accent-color);
    border-radius: 10px;
}

.mode-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.mode-info h4 {
    margin: 0 0 0.3rem 0;
    color: var(--text-primary);
}

.mode-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Deposit Screens */
#deposit-screen {
    overflow-y: auto;
    height: 100vh;
}

.deposit-container {
    padding: 1rem;
    height: calc(100vh - 80px);
    /* Account for bottom navigation */
    overflow-y: auto;
}

.deposit-method {
    background: var(--secondary-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.deposit-method h3 {
    color: var(--button-primary);
    margin-bottom: 0.5rem;
}

.amount-buttons {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.amount-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.amount-btn:hover,
.amount-btn.selected {
    background: var(--button-primary);
    transform: translateY(-2px);
}

.deposit-btn {
    width: 100%;
    background: var(--button-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.deposit-btn.primary {
    background: #4CAF50;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.language-btn {
    background: var(--secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 120px;
    display: none;
}

.language-option {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.language-option:hover {
    background: var(--accent-color);
}

/* Bottom Navigation */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--secondary-bg);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    border-top: 1px solid var(--accent-color);
    z-index: 20;
}

/* Earn Button Container */
.earn-btn-container {
    position: fixed;
    bottom: 40px;
    /* Наполовину на меню, наполовину над ним */
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
}

/* Earn Button */
.earn-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: earnBounce 3s ease-in-out infinite;
}

.earn-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.earn-btn:active {
    transform: translateY(-1px);
}

.earn-icon {
    font-size: 1.3rem;
}

/* Hide earn button during game */
body.game-active .earn-btn-container {
    display: none;
}

@keyframes earnBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.nav-btn.active {
    color: var(--button-primary);
}

.nav-icon {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.nav-label {
    font-size: 0.7rem;
}

/* Game Screen Layout */
#game-screen {
    background: linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    padding: 10px;
    gap: 10px;
    height: calc(100vh - 80px);
    /* Account for bottom navigation */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

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

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--button-primary);
    transition: all 0.3s ease;
}

.player-avatar.clickable {
    cursor: pointer;
}

.player-avatar.clickable:hover {
    transform: scale(1.1);
    border-color: var(--accent-color);
}

.player-avatar.expanded {
    width: 60px;
    height: 60px;
    border-width: 3px;
    z-index: 10;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bot Avatar Styling */
.bot-avatar {
    position: relative;
    border: 2px solid var(--accent-color) !important;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.bot-avatar::after {
    content: '🤖';
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
}

.bot-avatar:hover {
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.5);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.player-details {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.player-score {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--button-primary);
}

.game-info {
    text-align: center;
}

.round-counter {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--warning-color);
    background: var(--secondary-bg);
    padding: 5px 15px;
    border-radius: 20px;
}

/* Game Areas */
.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.opponent-area {
    flex: 1;
    justify-content: flex-start;
}

.player-area {
    flex: 1;
    justify-content: flex-end;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 10px;
}

/* Cards Container */
.cards-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Card Styles with Flip Effect */
.card {
    width: 80px;
    height: 120px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: scale(1.05);
}

.card.selected {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.8), 0 0 40px rgba(74, 144, 226, 0.4);
    border: 3px solid var(--button-primary);
    animation: selectedCardGlow 1.5s ease-in-out infinite alternate;
}

@keyframes selectedCardGlow {
    0% {
        box-shadow: 0 0 20px rgba(74, 144, 226, 0.8), 0 0 40px rgba(74, 144, 226, 0.4);
    }

    100% {
        box-shadow: 0 0 30px rgba(74, 144, 226, 1), 0 0 60px rgba(74, 144, 226, 0.6);
    }
}

.card.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

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

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.card-front {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #333;
    border: 2px solid var(--button-primary);
}

.card-back {
    background: linear-gradient(135deg, var(--button-primary) 0%, var(--button-hover) 100%);
    color: white;
    transform: rotateY(180deg);
}

.card-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Opponent cards are always face down initially */
.opponent-card .card-inner {
    transform: rotateY(180deg);
}

.opponent-card.revealed .card-inner {
    transform: rotateY(0deg);
}

/* Bet Display */
.bet-display {
    background: var(--secondary-bg);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid var(--button-primary);
    min-width: 80px;
    text-align: center;
}

.bet-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--button-primary);
}

/* Game Center */
.game-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--accent-color);
    border-radius: 20px;
    min-height: 100px;
    justify-content: center;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.round-result {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.round-result.show {
    opacity: 1;
    transform: translateY(0);
}

.result-cards {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.played-card {
    width: 60px;
    height: 90px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.vs-indicator {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    padding: 5px 10px;
    background: var(--secondary-bg);
    border-radius: 15px;
}

.result-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Social Panel - Top Right (moved lower) */
.social-panel-top {
    position: absolute;
    top: 80px;
    /* Positioned below header */
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 30;
    /* Higher z-index to be above game elements */
}

.social-btn-mini {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: var(--button-primary);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.social-btn-mini:hover {
    background: var(--button-hover);
    transform: scale(1.1);
}

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

/* Emotion and Gift Animations */
.emotion-bubble {
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    z-index: 100;
    animation: emotionFloat 2s ease-out forwards;
}

@keyframes emotionFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.5);
    }

    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.8);
    }
}

.gift-animation {
    position: absolute;
    font-size: 2.5rem;
    pointer-events: none;
    z-index: 100;
    animation: giftFly 1.5s ease-in-out forwards;
}

@keyframes giftFly {
    0% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(0.8);
    }

    50% {
        opacity: 1;
        transform: translateX(var(--fly-x)) translateY(-20px) scale(1.1);
    }

    100% {
        opacity: 0;
        transform: translateX(calc(var(--fly-x) * 2)) translateY(0) scale(0.9);
    }
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    bottom: 155px;
    /* Поднято на 55px выше кнопки прокрутки */
    right: 15px;
    z-index: 30;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--button-primary);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.floating-btn:hover {
    background: var(--button-hover);
    transform: scale(1.1);
}

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

/* Round Result Overlay */
.round-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.round-result-overlay.show {
    opacity: 1;
    visibility: visible;
}

.round-result-modal {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.round-result-overlay.show .round-result-modal {
    transform: scale(1);
}

/* Played Cards Display */
.result-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.played-card {
    width: 80px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0);
    animation: cardReveal 0.5s ease-out forwards;
}

.played-card.player-played {
    animation-delay: 0.2s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.played-card.opponent-played {
    animation-delay: 0.4s;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.vs-indicator {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-value {
    font-size: 48px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.score-change {
    display: inline-block;
    margin-top: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #ffd700;
}

@keyframes cardReveal {
    from {
        transform: scale(0) rotateY(180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotateY(0);
        opacity: 1;
    }
}

/* Blockchain Background Animations */
.blockchain-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.blockchain-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.6;
    box-shadow: 0 0 10px var(--accent-color);
}

.blockchain-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
    transform-origin: left center;
}

/* Game Background Animation */
.game-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.crypto-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--button-primary);
    border-radius: 50%;
    opacity: 0.4;
}

/* Enhanced Background Animation for Menu */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.5;
}

.network-lines {
    position: absolute;
    width: 100%;
    height: 100%;
}

.network-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.2;
}

/* Ensure content is above background */
.welcome-container,
.menu-container,
.game-header,
.game-area {
    position: relative;
    z-index: 10;
}

/* Old Social Panel (keep for compatibility) */
.social-panel {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--button-primary);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social-btn:hover {
    background: var(--button-hover);
    transform: scale(1.1);
}

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

/* Currency Selection */
.currency-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.currency-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.currency-btn:hover {
    border-color: var(--button-primary);
    background: var(--button-hover);
}

.currency-btn.selected {
    border-color: var(--accent-color);
    background: var(--accent-color);
}

.currency-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--button-primary);
    border-radius: 50%;
}

.currency-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.currency-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.currency-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Network Selection */
.network-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.network-btn {
    padding: 12px;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-primary);
}

.network-btn:hover {
    border-color: var(--button-primary);
    background: var(--button-hover);
    color: white;
}

.network-btn.selected {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

/* Bet Controls */
.bet-controls {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

/* Overlay loading indicator for bet button */
.bet-controls::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.bet-controls.loading::after {
    display: flex;
}

.bet-controls.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--button-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

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

.bet-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.bet-input-container label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 60px;
}

#bet-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--secondary-bg);
    outline: none;
    -webkit-appearance: none;
}

#bet-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--button-primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#bet-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--button-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bet-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--button-primary);
    min-width: 40px;
    text-align: center;
    background: var(--secondary-bg);
    padding: 5px 10px;
    border-radius: 15px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 0 15px;
}

.action-btn {
    flex: 1;
    max-width: 200px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn.primary {
    background: var(--button-primary);
    color: white;
}

.action-btn.primary:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.action-btn.primary.loading {
    background: var(--button-hover);
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.action-btn.primary.loading:hover {
    transform: none;
    background: var(--button-hover);
}

.action-btn.secondary {
    background: var(--secondary-bg);
    color: var(--text-primary);
    border: 2px solid var(--button-primary);
}

.action-btn.secondary:hover {
    background: var(--button-primary);
    color: white;
    transform: translateY(-2px);
}

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

.action-btn:active {
    transform: translateY(0);
}

/* Loading spinner for buttons */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result Screens */
.result-screen {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    justify-content: flex-start;
    align-items: center;
    padding: 20px 0;
    overflow-y: auto;
}

.result-container {
    text-align: center;
    max-width: 400px;
    width: 90%;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 25px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    margin: auto;
    min-height: fit-content;
}

#victory-animation,
#defeat-animation {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    background: var(--accent-color);
    border-radius: 50%;
}

.result-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

#victory-screen .result-title {
    color: var(--success-color);
}

#defeat-screen .result-title {
    color: var(--error-color);
}

.final-score {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--secondary-bg);
    border-radius: 15px;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.score-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--button-primary);
}

.reward-info,
.consolation-info {
    margin-bottom: 25px;
    padding: 10px;
    border-radius: 10px;
}

.reward-info {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--success-color);
}

.consolation-info {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid var(--error-color);
}

.reward-text,
.consolation-text {
    font-size: 1.1rem;
    font-weight: 600;
}

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

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 350px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--secondary-bg);
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--secondary-bg);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

/* Emotions and Gifts Grid */
.emotions-grid,
.gifts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.emotion-btn,
.gift-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 10px;
    border: 2px solid var(--secondary-bg);
    border-radius: 15px;
    background: var(--accent-color);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emotion-btn:hover,
.gift-btn:hover {
    border-color: var(--button-primary);
    background: var(--button-primary);
    transform: scale(1.05);
}

.emotion-btn.free {
    border-color: var(--success-color);
}

.emotion-btn.paid {
    border-color: var(--warning-color);
}

.cost {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 15px 25px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transition: transform 0.3s ease;
    max-width: 90%;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-message {
    font-size: 1rem;
    font-weight: 600;
}

/* Animation styles for emotions and gifts */
.emotion-animation,
.gift-animation {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    user-select: none;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transform-origin: center center;
}

.emotion-bounce,
.gift-received {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    user-select: none;
    font-size: 3rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
    transform-origin: center center;
}

.firework-particle {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    user-select: none;
    font-size: 1rem;
    animation: sparkle 0.5s ease-in-out infinite alternate;
    transform-origin: center center;
}

@keyframes sparkle {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.7;
    }
}

/* Enhanced avatar styles for better animation targeting */
.player-info,
.opponent-info {
    position: relative;
    transition: all 0.3s ease;
}

.player-info:hover,
.opponent-info:hover {
    transform: scale(1.05);
}

/* Achievements styles */
.achievements-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.achievements-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.achievements-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.achievement-item.unlocked {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.achievement-item.locked {
    opacity: 0.5;
    filter: grayscale(0.7);
}

.achievement-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.achievement-name {
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.2;
}

.achievement-progress {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.achievement-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.level-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    gap: 15px;
}

.level-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.level-icon {
    font-size: 1.5rem;
}

.level-name {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-size: 1rem;
}

.level-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.level-progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-align: center;
}

.level-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #03DAC6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 480px) {
    .card {
        width: 70px;
        height: 105px;
    }

    .card-value {
        font-size: 1.5rem;
    }

    .game-header {
        padding: 8px 12px;
    }

    .player-avatar {
        width: 35px;
        height: 35px;
    }

    .result-container {
        padding: 20px;
    }

    .result-title {
        font-size: 2rem;
    }

    .emotions-grid,
    .gifts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        flex-direction: column;
    }

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

    .menu-container,
    .welcome-container {
        padding: 1rem 0.5rem;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-height: 600px) {
    .game-area {
        padding: 10px;
        gap: 10px;
    }

    .game-center {
        padding: 15px;
        min-height: 80px;
    }

    .card {
        width: 65px;
        height: 95px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #game-screen {
        padding: 5px;
        gap: 5px;
    }

    .game-header {
        padding: 5px 10px;
    }

    .game-area {
        padding: 8px;
        gap: 8px;
    }

    .game-center {
        padding: 10px;
        min-height: 60px;
    }

    .card {
        width: 55px;
        height: 80px;
    }

    .card-value {
        font-size: 1.2rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

.slide-down {
    animation: slideDown 0.5s ease forwards;
}

.bounce {
    animation: bounce 0.6s ease forwards;
}

.shake {
    animation: shake 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    40%,
    43% {
        transform: translate3d(0, -10px, 0);
    }

    70% {
        transform: translate3d(0, -5px, 0);
    }

    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Scroll to bottom button */
.scroll-to-bottom {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--button-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* Hide scroll button during game */
#game-screen.active~.scroll-to-bottom,
body:has(#game-screen.active) .scroll-to-bottom {
    display: none !important;
}

/* Alternative approach - hide when game screen is active */
.scroll-to-bottom {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#game-screen.active~.scroll-to-bottom {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Compact replace card modal */
.replace-card-modal {
    max-height: 90vh;
    overflow-y: auto;
}

.replace-card-info-compact {
    text-align: center;
    margin-bottom: 15px;
}

.cost-info {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.help-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.card-selection-mobile {
    margin: 15px 0;
}

.cards-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.card-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 5px;
}

.card-option:hover {
    border-color: var(--accent-color);
}

.card-option.selected {
    border-color: var(--button-primary);
    background: rgba(74, 144, 226, 0.1);
}

.card-preview {
    width: 50px;
    height: 70px;
    background: var(--card-bg);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
}

.selected-card-info {
    text-align: center;
    padding: 8px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.modal-actions .action-btn {
    flex: 1;
    max-width: 120px;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Levels Modal Styles */
.levels-modal-content {
    max-width: 450px;
}

.levels-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.level-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--primary-bg);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.level-item.current {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.level-item.locked {
    opacity: 0.5;
}

.level-item-icon {
    font-size: 2rem;
    margin-right: 15px;
}

.level-item-info {
    flex: 1;
}

.level-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.level-item-requirement {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.level-item-badge {
    position: absolute;
    top: 8px;
    right: 12px;
    padding: 4px 10px;
    background: var(--accent-color);
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.level-item-badge.locked {
    background: var(--secondary-bg);
    color: var(--text-secondary);
}

/* Mobile responsiveness for replace modal */
@media (max-width: 768px) {
    .replace-card-modal {
        max-height: 85vh;
    }

    .cards-row {
        gap: 6px;
    }

    .card-preview {
        width: 45px;
        height: 60px;
        font-size: 1.2rem;
    }

    .modal-actions .action-btn {
        max-width: 100px;
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Card flip animation */
.player-card {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.player-card.flipping {
    transform: rotateY(90deg);
}

/* Bot game notification */
.bot-game-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bot-game-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: column;
    text-align: center;
}

.bot-icon {
    font-size: 1.2rem;
}

.notification-text {
    font-weight: bold;
    font-size: 0.9rem;
}

.notification-subtext {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 2px;
}

.scroll-to-bottom.show {
    opacity: 0.8;
    visibility: visible;
}

.scroll-to-bottom:hover {
    opacity: 1;
    transform: scale(1.1);
}

.scroll-to-bottom:active {
    transform: scale(0.95);
}

@keyframes scrollPulse {

    0%,
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    50% {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
    }
}

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

.invisible {
    opacity: 0 !important;
}

.disabled {
    pointer-events: none !important;
    opacity: 0.6 !important;
}

.text-center {
    text-align: center;
}

.text-success {
    color: var(--success-color) !important;
}

.text-error {
    color: var(--error-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

/* Float
ing Replace Card Button */
.floating-actions {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 3px solid #fff;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
}

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

/* Replace Card Modal */
#replace-card-modal .modal-content {
    max-width: 500px;
}

.replace-card-info {
    text-align: center;
    margin-bottom: 20px;
}

.replace-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.card-selection {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.card-option {
    text-align: center;
    padding: 15px;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.card-option:hover {
    border-color: var(--button-primary);
    transform: translateY(-2px);
}

.card-preview {
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.select-card-btn {
    background: var(--button-primary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.select-card-btn:hover {
    background: var(--button-hover);
}

/* Insufficient Balance Modal */
#insufficient-balance-modal .modal-content,
#invalid-mode-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

.insufficient-balance-animation,
.error-animation {
    font-size: 64px;
    margin: 20px 0;
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.topup-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.topup-buttons .action-btn {
    flex: 1;
    max-width: 150px;
}

/* Game Mode Modal Improvements */
.game-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.game-mode-modal {
    background: var(--secondary-bg);
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.game-mode-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.game-mode-btn {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.game-mode-btn:hover {
    border-color: var(--button-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-mode-btn.crypto {
    border-color: #00d4aa;
}

/* Withdrawal Modal Styles */
.withdrawal-modal {
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.withdrawal-content {
    margin: 20px 0;
}

.withdrawal-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #4CAF50;
}

.withdrawal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.currency-icon {
    font-size: 1.5rem;
}

.currency-name {
    font-weight: bold;
    color: var(--text-primary);
}

.withdrawal-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-info .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.balance-info .amount {
    font-weight: bold;
    color: #4CAF50;
}

.withdrawal-note {
    margin-top: 8px;
}

.withdrawal-note small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.withdrawal-process {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.withdrawal-process h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 5px 0;
}

.withdrawal-actions {
    margin: 20px 0;
}

.withdrawal-btn {
    width: 100%;
    padding: 10px 15px;
    margin-top: 10px;
    background: var(--button-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.withdrawal-btn:hover {
    background: var(--button-hover);
    transform: translateY(-1px);
}

.withdrawal-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.withdrawal-confirm-info {
    text-align: left;
    margin: 15px 0;
}

.withdrawal-confirm-info p {
    margin: 8px 0;
}

.warning-text {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

.warning-text p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.success-info {
    text-align: left;
    margin: 15px 0;
}

.support-info {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

/* Achievement Modal Styles */
.achievement-modal {
    max-width: 350px;
    text-align: center;
}

.achievement-large-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.achievement-title {
    color: var(--text-primary);
    margin: 10px 0;
    font-size: 1.3rem;
}

.achievement-description {
    color: var(--text-secondary);
    margin: 15px 0;
    line-height: 1.4;
}

.achievement-reward-large {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
    color: #4CAF50;
    font-weight: bold;
}

.achievement-status {
    padding: 8px 15px;
    border-radius: 20px;
    margin: 15px 0;
    font-weight: bold;
}

.achievement-status.unlocked {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.achievement-status.locked {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
    border: 1px solid rgba(158, 158, 158, 0.5);
}

.achievement-progress-info {
    margin: 15px 0;
}

.progress-text {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--button-primary), var(--success-color));
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-percent {
    color: var(--text-primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.achievement-close {
    margin-top: 20px;
}

.game-mode-btn.crypto:hover {
    border-color: #00b894;
}

.mode-icon {
    font-size: 32px;
    margin-right: 15px;
}

.mode-info {
    display: flex;
    flex-direction: column;
}

.mode-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

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

.close-modal {
    background: var(--accent-color);
    color: var(--text-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: var(--button-hover);
}

/* Mobile Responsiveness for Floating Button */
@media (max-width: 768px) {
    .floating-actions {
        right: 15px;
        bottom: 120px;
        /* Еще выше на мобильном */
        top: auto;
        bottom: 100px;
        transform: none;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .card-selection {
        flex-direction: column;
        align-items: center;
    }

    .game-mode-options {
        gap: 10px;
    }

    .game-mode-btn {
        padding: 12px;
    }

    .mode-icon {
        font-size: 24px;
        margin-right: 10px;
    }
}

/* Select elements styling */
select {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--button-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

select:hover {
    border-color: var(--button-primary);
}

/* Select option styling */
select option {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 10px;
}

/* Network selector specific styling */
.network-selector select,
.currency-selector select {
    background: var(--secondary-bg);
    color: var(--text-primary);
    border: 2px solid var(--accent-color);
}

.network-selector select option,
.currency-selector select option {
    background: var(--secondary-bg);
    color: var(--text-primary);
}

/* Mod
al styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--secondary-bg);
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    color: var(--text-primary);
}

.modal-body p {
    margin: 15px 0;
    line-height: 1.5;
}

.topup-buttons,
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.topup-buttons .action-btn,
.action-buttons .action-btn {
    flex: 1;
    max-width: 150px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: var(--button-primary);
    color: white;
}

.action-btn.primary:hover {
    background: var(--button-hover);
}

.action-btn.secondary {
    background: var(--accent-color);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    background: var(--button-hover);
    color: white;
}

/* Deposit Tabs */
.deposit-tabs {
    display: flex !important;
    background: #16213e !important;
    border-radius: 12px;
    margin: 0 20px 20px 20px;
    padding: 4px;
    border: 2px solid #0f3460 !important;
    min-height: 50px;
    visibility: visible !important;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: #333 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    display: block !important;
}

.tab-btn.active {
    background: #e94560 !important;
    color: white !important;
    border: 2px solid #e94560 !important;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Transaction History Styles */
.history-container {
    padding: 20px;
}

.history-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--button-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active {
    background: #e94560 !important;
    color: white !important;
    border: 2px solid #e94560 !important;
    border-color: var(--primary-color);
}

.balance-summary {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.balance-item:last-child {
    margin-bottom: 0;
}

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

.balance-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.balance-value.bonus {
    color: #ffd700;
}

.balance-value.withdrawable {
    color: #28a745;
}

.transaction-list {
    min-height: 200px;
}

.transaction-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.transaction-item:hover {
    border-color: var(--primary-color);
}

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

.transaction-amount {
    font-weight: 600;
    font-size: 16px;
}

.transaction-amount.positive {
    color: #28a745;
}

.transaction-amount.negative {
    color: #dc3545;
}

.transaction-amount.bonus {
    color: #ffd700;
}

.transaction-type {
    background: var(--button-secondary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.transaction-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.transaction-date {
    color: var(--text-tertiary);
    font-size: 12px;
}

.transaction-bonus-badge {
    background: #ffd700;
    color: #000;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

.load-more-btn {
    width: 100%;
    padding: 12px;
    background: var(--button-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.load-more-btn:hover {
    background: var(--button-secondary-hover);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.empty-history {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-history-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Clicka
ble balance items */
.balance-item.clickable,
.balance-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.balance-item.clickable:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px 8px;
    margin: -4px -8px;
}

.balance-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.balance-card.clickable:active {
    transform: translateY(0);
}
/* B
ot Profile Modal */
.bot-profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bot-profile-modal.show {
    opacity: 1;
}

.bot-profile-content {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    max-width: 350px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.bot-profile-modal.show .bot-profile-content {
    transform: scale(1);
}

.bot-profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}

.bot-profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.bot-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-profile-info {
    flex: 1;
}

.bot-profile-info h3 {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.bot-skill-level {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 3px;
}

.bot-language {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.close-profile-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    border: none;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-profile-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.bot-profile-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--secondary-bg);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: bold;
}

/* Mobile responsiveness for bot profile */
@media (max-width: 480px) {
    .bot-profile-content {
        padding: 15px;
        max-width: 95%;
    }
    
    .bot-profile-header {
        gap: 10px;
    }
    
    .bot-profile-avatar {
        width: 50px;
        height: 50px;
    }
    
    .bot-profile-info h3 {
        font-size: 1.1rem;
    }
    
    .stat-item {
        padding: 8px 12px;
    }
}