/* TGCoins - TGCoin Miner Styles */

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

:root {
    --gold: #FFD700;
    --dark-gold: #B8860B;
    --bronze: #CD7F32;
    --dark-bg: #1a1a1a;
    --darker-bg: #0f0f0f;
    --light-text: #ffffff;
    --gray-text: #cccccc;
    --success: #4CAF50;
    --error: #f44336;
    --warning: #ff9800;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1810 100%);
    color: var(--light-text);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    padding: 30px;
    background: linear-gradient(135deg, var(--dark-gold), var(--bronze));
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.title-section {
    text-align: left;
}

header h1 {
    font-size: 3em;
    color: var(--light-text);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2em;
    color: var(--light-text);
    opacity: 0.9;
}

/* User Section */
.user-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
}

.user-name {
    color: var(--gold);
    font-weight: bold;
    font-size: 1.1em;
}

.user-type {
    color: var(--gray-text);
    font-size: 0.9em;
}

.user-buttons {
    display: flex;
    gap: 10px;
}

.admin-link {
    color: #ff3333;
    font-size: 1.5em;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
}

.admin-link:hover {
    transform: scale(1.2) rotate(90deg);
    filter: drop-shadow(0 0 8px #ff3333);
}

.mail-link {
    color: var(--gold);
    font-size: 1.5em;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    position: relative;
}

.mail-link:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px var(--gold));
}

.mail-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff3333;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 5px rgba(255, 51, 51, 0);
    }
}

.user-btn {
    background: var(--gold);
    color: var(--dark-bg);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.user-btn.logout-btn {
    background: var(--bronze);
}


/* Game Area */
.game-area {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Mining Display */
/* Main Stages Container */
.main-stages-container {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--darker-bg), var(--dark-bg));
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--bronze);
    overflow: hidden;
}

.stage-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--bronze);
}

.stage-tab {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: var(--gray-text);
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.stage-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--gold), var(--bronze));
    color: var(--dark-bg);
    border-radius: 50%;
    font-size: 0.9em;
    font-weight: bold;
    margin-right: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stage-tab:last-child {
    border-right: none;
}

.stage-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gold);
}

.stage-tab.active {
    background: var(--darker-bg);
    color: var(--gold);
    border-bottom: 3px solid var(--gold);
}

.stage-content {
    padding: 40px;
}

.stage-panel {
    display: none;
}

.stage-panel.active {
    display: block;
}

/* Stage panel specific styles */
#stage-cones h2 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 1.8em;
    text-align: center;
}

#stage-reset h2 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 1.8em;
    text-align: center;
}

.prestige-info {
    color: var(--gray-text);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1em;
}

.reset-info {
    color: var(--gray-text);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1em;
}

.mining-display {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--darker-bg), var(--dark-bg));
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--bronze);
}

.coin-counter {
    text-align: center;
    margin-bottom: 30px;
}

.coin-counter h2 {
    color: var(--gold);
    font-size: 2em;
    margin-bottom: 15px;
}

.balance {
    font-size: 3.5em;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    font-family: 'Courier New', monospace;
}

.mining-rate {
    font-size: 1.3em;
    color: var(--gray-text);
    margin-top: 10px;
}

/* Mining Action */
.mining-action {
    text-align: center;
}

.mine-btn {
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    border: none;
    padding: 30px 60px;
    font-size: 2em;
    font-weight: bold;
    color: var(--dark-bg);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
    width: 200px;
    height: 200px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mine-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.6);
}

.mine-btn:active,
.mine-btn.mining {
    transform: scale(0.95);
}

.pickaxe {
    font-size: 1.5em;
    animation: swing 1s ease-in-out infinite;
}

@keyframes swing {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.click-power {
    margin-top: 20px;
    font-size: 1.1em;
    color: var(--gray-text);
}

/* Upgrades Section */
.upgrades-section {
    grid-column: span 1;
    background: var(--darker-bg);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--bronze);
}

/* Prestige/Parking Cone Section */
.prestige-section {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.3);
    border: 3px solid #ffa500;
}

.prestige-section h2 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.8em;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.prestige-info {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1em;
}

.cone-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: stretch;
    flex-wrap: wrap;
}

.cone-stats {
    flex: 1;
    min-width: 300px;
}

.leaderboards-container {
    flex: 1;
    min-width: 300px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.leaderboard-tab {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.leaderboard-tab:hover {
    background: rgba(255, 255, 255, 0.2);
}

.leaderboard-tab.active {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
}

.leaderboard-content {
    position: relative;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-panel {
    display: none;
}

.leaderboard-panel.active {
    display: block;
}

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

.leaderboard-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.leaderboard-entry:hover {
    background: rgba(255, 255, 255, 0.15);
}

.leaderboard-entry.top-3 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), rgba(255, 255, 255, 0.1));
}

.leaderboard-entry.user-entry {
    border: 2px solid #ffd700;
    background: rgba(255, 215, 0, 0.2);
}

.leaderboard-rank {
    font-weight: bold;
    color: #ffd700;
    min-width: 40px;
}

.leaderboard-rank.top-1 {
    color: #FFD700;
    font-size: 1.3em;
}

.leaderboard-rank.top-2 {
    color: #C0C0C0;
    font-size: 1.2em;
}

.leaderboard-rank.top-3 {
    color: #CD7F32;
    font-size: 1.1em;
}

.leaderboard-name {
    flex: 1;
    color: white;
    margin: 0 15px;
}

.leaderboard-country {
    font-size: 1.2em;
    margin-right: 10px;
}

.leaderboard-score {
    color: #ffd700;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-left: auto;
    text-align: right;
}


.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.stat-row .label {
    color: white;
    font-weight: bold;
}

.stat-row .value {
    color: #ffd700;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.prestige-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.prestige-btn {
    flex: 1;
    min-width: 200px;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.prestige-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
}

.prestige-btn:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.prestige-btn.finish-btn {
    background: linear-gradient(135deg, #00ff00, #00cc00);
}

.prestige-btn.cone-pack-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.prestige-btn.finish-btn:not(:disabled) {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 15px rgba(0, 255, 0, 0.3);
    }
    50% {
        box-shadow: 0 5px 25px rgba(0, 255, 0, 0.6);
    }
}

.prestige-explanation {
    color: white;
    text-align: center;
    font-size: 0.95em;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
}

/* Reset/Ascension Section */
.reset-section {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #8b00ff, #5a00b8);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(139, 0, 255, 0.3);
    border: 3px solid #a020f0;
}

.reset-section h2 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.8em;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.reset-info {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1em;
}

.reset-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.reset-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reset-preview {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
}

.reset-preview h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.preview-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    color: white;
}

.preview-stat span:last-child {
    color: #00ff00;
    font-weight: bold;
}

.preview-requirements {
    margin-top: 15px;
    color: white;
}

.preview-requirements ul {
    list-style-position: inside;
    padding-left: 10px;
}

.preview-requirements li {
    margin-bottom: 5px;
}

.reset-btn {
    width: 100%;
    padding: 20px;
    font-size: 1.5em;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ff00ff, #ff66ff);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
    margin-bottom: 15px;
}

.reset-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 0, 255, 0.5);
}

.reset-btn:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.reset-btn:not(:disabled) {
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
    }
    50% {
        box-shadow: 0 5px 30px rgba(255, 0, 255, 0.7), 0 0 40px rgba(255, 0, 255, 0.5);
    }
}

.reset-explanation {
    color: white;
    text-align: center;
    font-size: 0.95em;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
}

.upgrades-section h2 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.8em;
}

.upgrades-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upgrade-item {
    background: var(--dark-bg);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.upgrade-item.affordable {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.upgrade-item.unaffordable {
    opacity: 0.6;
    border-color: rgba(255, 255, 255, 0.1);
}

.upgrade-category-header {
    color: var(--gold);
    font-size: 1.3em;
    margin: 20px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bronze);
}

.upgrade-category-header:first-child {
    margin-top: 0;
}

.upgrade-info h3 {
    color: var(--gold);
    margin-bottom: 5px;
    font-size: 1.1em;
}

.upgrade-info p {
    color: var(--gray-text);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.upgrade-level {
    color: var(--bronze);
    font-size: 0.85em;
    font-weight: bold;
}

.upgrade-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.bulk-toggle {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 3px;
}

.bulk-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    color: var(--gray-text);
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bulk-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.bulk-toggle-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    color: var(--dark-bg);
}

.upgrade-cost {
    color: var(--gold);
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.upgrade-btn {
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--dark-bg);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.upgrade-btn.disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
}

/* Premium Section */
.premium-section {
    grid-column: span 1;
    background: linear-gradient(135deg, #2d1a4d, #1a0d2e);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.3);
    border: 2px solid #9370DB;
}

.premium-section h2 {
    color: #DDA0DD;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.premium-info {
    color: var(--gray-text);
    margin-bottom: 20px;
    font-style: italic;
}

.premium-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.premium-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #9370DB;
    display: flex;
    flex-direction: column;
}

.premium-item h3 {
    color: #DDA0DD;
    margin-bottom: 6px;
    font-size: 1em;
}

.premium-item p {
    color: var(--gray-text);
    margin-bottom: 8px;
    font-size: 0.85em;
}

.premium-price {
    color: #FFD700;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 8px;
}

.premium-item > div {
    max-width: 250px;
    margin: 0 auto;
    width: 100%;
}

.disclaimer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    text-align: center;
}

/* Ad Container */
.ad-container {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.ad-placeholder {
    background: var(--darker-bg);
    border: 2px dashed #555;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.ad-label {
    color: #888;
    font-size: 0.8em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.ad-content {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.2em;
}

/* Footer */
footer {
    background: var(--darker-bg);
    padding: 25px;
    border-radius: 15px;
    margin-top: 20px;
    border: 2px solid var(--bronze);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

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

.stat-label {
    color: var(--gray-text);
    display: block;
    margin-bottom: 5px;
}

.stat-item span:last-child {
    color: var(--gold);
    font-weight: bold;
    font-size: 1.2em;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-small {
    background: var(--bronze);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--light-text);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(205, 127, 50, 0.4);
}

.btn-danger {
    background: var(--error);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--dark-bg);
    color: var(--light-text);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 1000;
    border-left: 4px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    max-width: 350px;
}

.notification-icon {
    font-size: 1.2em;
    font-weight: bold;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
}

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

.notification-success {
    border-left-color: var(--success);
}

.notification-success .notification-icon {
    color: var(--success);
}

.notification-error {
    border-left-color: var(--error);
}

.notification-error .notification-icon {
    color: var(--error);
}

.notification-warning {
    border-left-color: var(--warning);
}

.notification-warning .notification-icon {
    color: var(--warning);
}

/* Responsive Design - Mobile First Approach */

/* Prevent text size adjustments on device rotation */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Base mobile styles - applied to all devices first */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 16px; /* Changed from 14px - better for readability on mobile */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .game-area {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    header h1 {
        font-size: 1.5rem; /* Use rem for consistent scaling */
    }
    
    .balance {
        font-size: 1.8rem;
    }
    
    .coin-counter h2 {
        font-size: 1.3rem;
    }
    
    .stage-content {
        padding: 15px; /* Reduced for mobile */
    }
    
    .stage-tab {
        padding: 12px 15px;
        font-size: 0.95rem;
        min-width: 90px; /* Ensures consistent button size */
    }
    
    .mine-btn {
        width: 120px;
        height: 120px;
        font-size: 1.2rem;
        padding: 15px 30px;
    }
    
    .stats {
        flex-direction: row; /* Keep horizontal but allow wrapping */
        justify-content: space-between;
    }
    
    .stat-item {
        min-width: 45%; /* Ensures consistent layout */
        margin-bottom: 10px;
    }
    
    .upgrade-item, .premium-item {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .stat-row {
        padding: 10px;
        font-size: 0.95rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-label {
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .stat-value {
        font-size: 1rem;
        text-align: right;
        word-break: break-all; /* Prevents numbers from breaking layout */
    }
    
    .reset-display, .cone-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .upgrade-cost, .upgrade-level {
        font-size: 0.9rem;
    }
    
    /* Fix leaderboard table on mobile */
    .leaderboard-entry {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    
    /* Ensure bulk purchase buttons are properly sized */
    .bulk-toggle {
        padding: 6px 10px;
        font-size: 0.85rem;
        min-width: 40px;
    }
    
    /* Fix split layout on mobile - should stack */
    .upgrades-premium-container {
        grid-template-columns: 1fr !important; /* Force single column on mobile */
        gap: 15px;
    }
    
    /* Login bonus container mobile fix */
    #loginBonusContainer {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    /* Footer mobile fix */
    footer {
        padding: 15px;
        font-size: 0.9rem;
    }
}

/* Small phones - extra adjustments */
@media (max-width: 480px) {
    body {
        font-size: 15px;
        padding: 5px;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    .balance {
        font-size: 1.5rem;
    }
    
    .stage-tab {
        padding: 10px 12px;
        font-size: 0.85rem;
        min-width: 80px;
    }
    
    .mine-btn {
        width: 100px;
        height: 100px;
        font-size: 1rem;
    }
    
    .stat-item {
        min-width: 100%; /* Stack on very small screens */
    }
}

/* Landscape mode fixes for phones */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    header h1 {
        font-size: 1.2rem;
    }
    
    .stage-content {
        padding: 10px;
    }
    
    .mine-btn {
        width: 80px;
        height: 80px;
        font-size: 0.9rem;
    }
}

/* PayPal Button Styling */
.paypal-buttons {
    max-width: 300px;
    margin: 0 auto;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

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

.modal.show {
    display: block;
}

.modal-content {
    background: linear-gradient(135deg, var(--darker-bg), var(--dark-bg));
    margin: 5% auto;
    padding: 30px;
    border: 2px solid var(--gold);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s;
}

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

.close-modal {
    color: var(--gray-text);
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--gold);
}

/* Auth Forms */
.auth-form {
    text-align: center;
}

.auth-form h2 {
    color: var(--gold);
    margin-bottom: 10px;
    font-size: 2em;
}

.auth-description {
    color: var(--gray-text);
    margin-bottom: 25px;
    font-size: 0.95em;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid var(--bronze);
    border-radius: 8px;
    background: var(--darker-bg);
    color: var(--light-text);
    font-size: 1em;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.auth-form input::placeholder {
    color: #888;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    border: none;
    border-radius: 8px;
    color: var(--dark-bg);
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
}

.auth-switch {
    margin-top: 20px;
    color: var(--gray-text);
    font-size: 0.95em;
}

.auth-switch a {
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.auth-switch a:hover {
    color: var(--dark-gold);
    text-decoration: underline;
}

/* Profile Modal */
.profile-content h2 {
    color: var(--gold);
    text-align: center;
    margin-bottom: 20px;
}

.profile-info {
    background: var(--darker-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.profile-info p {
    color: var(--light-text);
    margin-bottom: 10px;
    font-size: 1em;
}

.profile-info strong {
    color: var(--gold);
}

.profile-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid var(--bronze);
    border-radius: 8px;
    background: var(--darker-bg);
    color: var(--light-text);
    font-size: 0.95em;
}

.profile-input:focus {
    outline: none;
    border-color: var(--gold);
}

/* Responsive Updates */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .title-section {
        text-align: center;
    }
    
    .user-section {
        flex-direction: column;
        width: 100%;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

/* Login Status Container */
.login-status-container {
    background: linear-gradient(135deg, #001f3f, #003366);
    border: 3px solid #0074D9;
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 1200px;
    box-shadow: 0 0 30px rgba(0, 116, 217, 0.5), 0 0 60px rgba(0, 116, 217, 0.3);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 116, 217, 0.5), 0 0 60px rgba(0, 116, 217, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 116, 217, 0.7), 0 0 80px rgba(0, 116, 217, 0.5);
    }
}

.login-status-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.login-status-icon {
    font-size: 3em;
    animation: bounce 2s ease-in-out infinite;
}

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

.login-status-text {
    flex: 1;
    min-width: 200px;
}

.login-status-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.login-status-tagline {
    font-size: 0.9em;
    color: #89CFF0;
    font-style: italic;
    margin-bottom: 8px;
    opacity: 0.9;
}

.login-status-info {
    font-size: 1.1em;
    color: #B8D4FF;
}

.login-status-timer {
    font-size: 2em;
    font-weight: bold;
    color: #FFD700;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.login-status-available {
    animation: attention 1s ease-in-out infinite;
}

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