* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Username Modal */
.username-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

.username-modal.hidden {
    display: none;
}

.username-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    text-align: center;
}

.username-content h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 2em;
}

.username-prompt {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.1em;
}

.username-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.username-input:focus {
    outline: none;
    border-color: #667eea;
}

.username-error {
    color: #e74c3c;
    font-size: 0.9em;
    min-height: 20px;
    margin-bottom: 15px;
}

.username-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    width: 100%;
}

.username-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.username-btn:active {
    transform: translateY(0);
}

.username-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.username-display {
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: inline-block;
}

.username-label {
    color: white;
    opacity: 0.9;
    margin-right: 8px;
}

.username-value {
    color: white;
    font-weight: bold;
    font-size: 1.1em;
}

/* Disclaimer Modal */
.disclaimer-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

.disclaimer-modal.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.disclaimer-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    text-align: center;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.disclaimer-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.disclaimer-text {
    margin-bottom: 25px;
    line-height: 1.8;
    color: #333;
}

.disclaimer-text p {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.disclaimer-text p:last-child {
    margin-bottom: 0;
    font-weight: bold;
    color: #667eea;
}

.disclaimer-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.disclaimer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.disclaimer-btn:active {
    transform: translateY(0);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.game-area {
    display: grid;
    grid-template-columns: 380px 1fr 400px;
    gap: 20px;
}

.main-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
}

.click-area {
    text-align: center;
    margin: 40px 0;
}

.human-character {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 20px auto;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 15px;
}

.human-character:hover {
    transform: scale(1.05);
}

.human-character:active {
    transform: scale(0.95);
}

.hans-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 15px;
    transition: all 0.3s ease;
    user-select: none;
    pointer-events: none;
}

.human-character.shake {
    animation: shake 0.4s ease-in-out;
}

.human-character.shake:hover {
    transform: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10% { transform: translateX(-12px) rotate(-3deg); }
    20% { transform: translateX(12px) rotate(3deg); }
    30% { transform: translateX(-10px) rotate(-2deg); }
    40% { transform: translateX(10px) rotate(2deg); }
    50% { transform: translateX(-8px) rotate(-1.5deg); }
    60% { transform: translateX(8px) rotate(1.5deg); }
    70% { transform: translateX(-5px) rotate(-1deg); }
    80% { transform: translateX(5px) rotate(1deg); }
    90% { transform: translateX(-2px) rotate(-0.5deg); }
}

.slap-hand {
    position: absolute;
    font-size: 100px;
    z-index: 200;
    pointer-events: none;
    animation: slapAnimation 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    transform-origin: right center;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

@keyframes slapAnimation {
    0% {
        opacity: 0;
        transform: translateX(-200px) translateY(-50%) rotate(-60deg) scale(0.3);
    }
    25% {
        opacity: 0.8;
        transform: translateX(-50px) translateY(-50%) rotate(-30deg) scale(0.8);
    }
    40% {
        opacity: 1;
        transform: translateX(10px) translateY(-50%) rotate(5deg) scale(1.3);
    }
    50% {
        opacity: 1;
        transform: translateX(20px) translateY(-50%) rotate(10deg) scale(1.1);
    }
    70% {
        opacity: 0.8;
        transform: translateX(40px) translateY(-50%) rotate(25deg) scale(0.9);
    }
    100% {
        opacity: 0;
        transform: translateX(80px) translateY(-50%) rotate(40deg) scale(0.6);
    }
}

.fame-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.fame-effects::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Fame Level Styles */
.human-character.level-1 .hans-image {
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    filter: brightness(1.05);
}

.human-character.level-2 .hans-image {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
    filter: brightness(1.1) saturate(1.1);
}

.human-character.level-3 .hans-image {
    box-shadow: 0 4px 25px rgba(255, 215, 0, 0.7);
    filter: brightness(1.15) saturate(1.2);
}

.human-character.level-4 .hans-image {
    box-shadow: 0 4px 30px rgba(255, 215, 0, 0.9);
    filter: brightness(1.2) saturate(1.3);
}

.human-character.level-5 .hans-image {
    box-shadow: 0 4px 35px rgba(255, 215, 0, 1);
    filter: brightness(1.25) saturate(1.4);
    animation: glow 2s ease-in-out infinite;
}

.human-character.level-5 .fame-effects::before {
    opacity: 0.3;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.5) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.3; }
    50% { transform: translateX(-50%) scale(1.2); opacity: 0.5; }
}

.character-info {
    margin: 20px 0;
}

.character-info h2 {
    font-size: 1.8em;
    color: #667eea;
    margin-bottom: 5px;
}

.character-info p {
    font-size: 1.1em;
    color: #666;
    font-style: italic;
}

.click-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    padding: 20px 50px;
    font-size: 1.3em;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 20px auto 0;
    width: 100%;
    max-width: 400px;
}

.click-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.click-button:active {
    transform: translateY(0);
}

.click-button .button-text {
    font-weight: bold;
    font-size: 1.2em;
}

.click-button .button-subtext {
    font-size: 0.8em;
    opacity: 0.9;
}

.save-load {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #4CAF50;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upgrades-section,
.generators-section,
.achievements-section,
.shop-section,
.scoreboard-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.upgrades-section h2,
.generators-section h2,
.achievements-section h2,
.shop-section h2,
.scoreboard-section h2 {
    margin-bottom: 15px;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.achievement-count {
    font-size: 0.8em;
    color: #666;
    font-weight: normal;
}

.scoreboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.scoreboard-tab {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #f5f7fa;
    color: #666;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.scoreboard-tab:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.35);
    color: #667eea;
}

.scoreboard-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.scoreboard-tab.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.scoreboard-headers {
    display: grid;
    grid-template-columns: 28px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.85em;
    font-weight: bold;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    margin-bottom: 10px;
}

.scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
}

.scoreboard-item {
    display: grid;
    grid-template-columns: 28px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f5f7fa;
    border-radius: 8px;
    font-size: 0.9em;
    border: 2px solid transparent;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.scoreboard-item.current-user {
    background: linear-gradient(135deg, #e8eaf6 0%, #f5f7fa 100%);
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.35);
}

.scoreboard-rank {
    font-weight: bold;
    color: #667eea;
}

.scoreboard-name {
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scoreboard-maatjes,
.scoreboard-klappen {
    color: #667eea;
    font-weight: bold;
    font-size: 0.85em;
}

.scoreboard-empty,
.scoreboard-loading,
.scoreboard-error {
    font-size: 0.9em;
    padding: 15px 12px;
    text-align: center;
    border-radius: 8px;
    background: #f5f7fa;
    border: 2px solid transparent;
}

.scoreboard-empty {
    color: #666;
}

.scoreboard-loading {
    color: #667eea;
    font-weight: 500;
}

.scoreboard-error {
    color: #c62828;
}

.scoreboard-retry-btn {
    display: block;
    margin: 10px auto 0;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scoreboard-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.upgrades-list,
.generators-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upgrade-item,
.generator-item {
    background: #f5f7fa;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid transparent;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
    cursor: pointer;
}

.upgrade-item:hover:not(.disabled),
.generator-item:hover:not(.disabled) {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.35);
}

.upgrade-item.disabled,
.generator-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-item.disabled:hover,
.generator-item.disabled:hover {
    border-color: transparent;
    box-shadow: none;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.item-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.item-cost {
    color: #667eea;
    font-weight: bold;
}

.item-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.item-stats {
    font-size: 0.85em;
    color: #888;
}

.count-badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    margin-left: 10px;
}

.achievements-toggle {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.achievements-toggle:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.achievements-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 420px;
    overflow-y: auto;
}

.achievements-panel.hidden {
    display: none;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement-item {
    background: #f5f7fa;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f5e9 100%);
    border-color: #4CAF50;
}

.achievement-item.locked {
    opacity: 0.6;
    background: #f0f0f0;
}

.achievement-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.achievement-description {
    font-size: 0.85em;
    color: #666;
}

.achievement-status {
    font-size: 1.5em;
    flex-shrink: 0;
}

.achievement-item.unlocked .achievement-status {
    color: #4CAF50;
}

.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 5000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
}

.achievement-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.achievement-notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-notification-icon {
    font-size: 3em;
    flex-shrink: 0;
}

.achievement-notification-text {
    flex: 1;
}

.achievement-notification-title {
    font-size: 0.9em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-notification-name {
    font-size: 1.1em;
    color: #333;
    font-weight: bold;
}

/* Shop Styles */
.shop-balance {
    margin-bottom: 15px;
    padding: 10px;
    background: #f5f7fa;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: #667eea;
}

.shop-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.shop-item {
    background: #f5f7fa;
    border-radius: 8px;
    padding: 12px;
    border: 2px solid transparent;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
    cursor: pointer;
}

.shop-item:hover:not(.disabled):not(.owned) {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.35);
}

.shop-item.owned {
    background: linear-gradient(135deg, #e8f5e9 0%, #f5f7fa 100%);
    border-color: #4CAF50;
    opacity: 0.8;
}

.shop-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-item.disabled:hover {
    border-color: transparent;
    box-shadow: none;
}

.shop-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-item-icon-name {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.shop-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.shop-item-info {
    flex: 1;
}

.shop-item-name {
    font-weight: bold;
    font-size: 1em;
    color: #333;
    margin-bottom: 4px;
}

.shop-item-description {
    font-size: 0.85em;
    color: #666;
}

.shop-item-cost {
    color: #667eea;
    font-weight: bold;
    font-size: 0.9em;
    flex-shrink: 0;
}

.owned-badge {
    color: #4CAF50;
    margin-left: 5px;
}

.purchase-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #4CAF50;
    color: white;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 5000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.purchase-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Brief glow on buyable panels when a purchase completes */
.upgrades-section.just-bought,
.generators-section.just-bought,
.shop-section.just-bought {
    animation: panelGlow 0.6s ease-out;
}

@keyframes panelGlow {
    0% { box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
    30% { box-shadow: 0 0 28px rgba(102, 126, 234, 0.5); }
    100% { box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
}

.purchase-notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.purchase-icon {
    font-size: 1.5em;
}

.purchase-text {
    font-weight: bold;
    font-size: 1em;
}

/* Cosmetic Effects */
.human-character.golden-frame {
    border: 4px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.human-character.rainbow-glow {
    animation: rainbowGlow 3s ease-in-out infinite;
}

@keyframes rainbowGlow {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    25% { filter: hue-rotate(90deg) brightness(1.1); }
    50% { filter: hue-rotate(180deg) brightness(1.2); }
    75% { filter: hue-rotate(270deg) brightness(1.1); }
}

.human-character.sparkles::after {
    content: '✨';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2em;
    animation: sparkleFloat 2s ease-in-out infinite;
}

@keyframes sparkleFloat {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); opacity: 1; }
    50% { transform: translateX(-50%) translateY(-20px) rotate(180deg); opacity: 0.7; }
}

.human-character.fire-effect::before {
    content: '🔥';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3em;
    z-index: -1;
    animation: fireFlicker 0.5s ease-in-out infinite;
}

@keyframes fireFlicker {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

.human-character.ice-effect::before {
    content: '❄️';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2em;
    z-index: -1;
    animation: iceFloat 2s ease-in-out infinite;
}

@keyframes iceFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.human-character.lightning-effect::after {
    content: '⚡';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2em;
    animation: lightningFlash 1s ease-in-out infinite;
}

@keyframes lightningFlash {
    0%, 90%, 100% { opacity: 0; }
    5%, 10% { opacity: 1; }
}

.human-character.crown::before {
    content: '👑';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5em;
    z-index: 5;
}

.human-character.sunglasses::before {
    content: '😎';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4em;
    z-index: 4;
    opacity: 0.3;
}

.human-character.party-hat::before {
    content: '🎉';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2em;
    z-index: 5;
}

.human-character.halo::before {
    content: '😇';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3em;
    z-index: 5;
}

.human-character.wings::after {
    content: '🪽';
    position: absolute;
    top: 50%;
    right: -40px;
    transform: translateY(-50%);
    font-size: 3em;
    z-index: 3;
    animation: wingFlap 1s ease-in-out infinite;
}

.human-character.wings::before {
    content: '🪽';
    position: absolute;
    top: 50%;
    left: -40px;
    transform: translateY(-50%) scaleX(-1);
    font-size: 3em;
    z-index: 3;
    animation: wingFlap 1s ease-in-out infinite;
}

@keyframes wingFlap {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-50%) rotate(10deg); }
}

.human-character.rainbow-trail {
    position: relative;
}

.human-character.rainbow-trail::after {
    content: '💫';
    position: absolute;
    top: 50%;
    left: -30px;
    transform: translateY(-50%);
    font-size: 2em;
    animation: trailMove 2s linear infinite;
}

@keyframes trailMove {
    0% { left: -30px; opacity: 0; }
    50% { opacity: 1; }
    100% { left: calc(100% + 30px); opacity: 0; }
}

@media (max-width: 1400px) {
    .game-area {
        grid-template-columns: 320px 1fr 350px;
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .game-area {
        grid-template-columns: 1fr;
    }
    
    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .human-character {
        width: 300px;
        height: 300px;
    }
    
    .left-sidebar {
        order: 3;
    }
}

/* Clicks Per Minute Counter */
.cpm-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
    font-size: 1em;
}

.cpm-label {
    color: #666;
    font-weight: 500;
}

.cpm-value {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2em;
}

/* Rate Limit Warning */
.rate-limit-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #e74c3c;
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    z-index: 3000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: shake 0.5s ease-in-out;
}

.rate-limit-warning.hidden {
    display: none;
}

@media (max-width: 600px) {
    .stats-panel {
        grid-template-columns: 1fr;
    }
    
    .human-character {
        width: 250px;
        height: 250px;
    }
    
    .cpm-counter {
        bottom: 10px;
        left: 10px;
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .rate-limit-warning {
        padding: 15px 30px;
        font-size: 1em;
        width: 90%;
        text-align: center;
    }
}
