* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    position: relative;
}

/* Honeycomb background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 215, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Decorative bees */
.bee-decoration {
    position: fixed;
    font-size: 2em;
    opacity: 0.1;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.bee-1 { top: 10%; left: 5%; animation-delay: 0s; }
.bee-2 { top: 30%; right: 8%; animation-delay: 2s; }
.bee-3 { bottom: 20%; left: 10%; animation-delay: 4s; }

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

#game-container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

h1::before {
    content: '🐝 ';
}

h1::after {
    content: ' 🍯';
}

#main-display {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffd700;
}

#secondary-display {
    font-size: 1.5em;
    color: #4ade80;
    margin-top: 5px;
}

#honey-per-second {
    font-size: 1.2em;
    color: #aaa;
}

#prestige-display {
    font-size: 1em;
    color: #a78bfa;
    margin-top: 5px;
}

/* Challenges section */
#challenges-section h2::before { content: '🎯 '; }

#challenge-display {
    text-align: center;
}

#no-challenge p {
    color: #888;
    margin-bottom: 15px;
}

#no-challenge button {
    padding: 10px 25px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

#no-challenge button:hover {
    transform: scale(1.05);
}

.challenge-goal {
    font-size: 1.2em;
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 10px;
}

.challenge-timer {
    color: #ff6b6b;
    margin-bottom: 10px;
}

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

.challenge-progress .progress-bar {
    flex: 1;
}

#challenge-progress-text {
    color: #4ade80;
    font-weight: bold;
    min-width: 40px;
}

.challenge-reward {
    color: #4ade80;
    font-size: 0.9em;
}

/* Bulk buy buttons */
#bulk-buy {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

#bulk-buy span {
    color: #888;
    font-size: 0.9em;
}

.bulk-btn {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    color: #aaa;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.bulk-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.bulk-btn.active {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    color: #ffd700;
}

/* Tab Navigation */
#tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px 8px 0 0;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
}

.tab-btn:hover {
    background: rgba(255, 215, 0, 0.1);
}

.tab-btn.active {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border-bottom-color: transparent;
}

.tab-content {
    display: none;
}

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

main {
    display: grid;
    gap: 20px;
}

section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
}

/* Honeycomb corner decoration */
section::before {
    content: '⬡';
    position: absolute;
    top: -8px;
    right: 10px;
    font-size: 1.2em;
    color: rgba(255, 215, 0, 0.3);
}

h2 {
    margin-top: 0;
    color: #ffd700;
    font-size: 1.2em;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

h3 {
    color: #ffd700;
    font-size: 1em;
    margin: 15px 0 10px;
}

.section-info {
    color: #888;
    font-size: 0.9em;
    margin: 0 0 15px;
}

/* Click area */
#click-area {
    position: relative;
    overflow: visible;
}

#float-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.float-text {
    position: absolute;
    font-weight: bold;
    font-size: 1.2em;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: floatUp 1s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.8);
    }
}

#collect-btn {
    width: 100%;
    padding: 20px;
    font-size: 1.3em;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #1a1a2e;
    font-weight: bold;
    transition: transform 0.05s, box-shadow 0.1s;
    position: relative;
    overflow: hidden;
}

#collect-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

#collect-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.6);
}

#collect-btn.clicked {
    animation: pulse 0.15s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px 10px rgba(255, 215, 0, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    }
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.4s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

#collect-btn .btn-info {
    display: block;
    font-size: 0.6em;
    font-weight: normal;
    margin-top: 5px;
}

#upgrade-list, #research-list, #flower-list, #products-list, #mutation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#bee-strains {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upgrade-btn, .research-btn, .strain-btn, .mutation-btn {
    width: 100%;
    padding: 15px;
    text-align: left;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    cursor: pointer;
    color: #e0e0e0;
    transition: background 0.2s, border-color 0.2s;
}

.upgrade-btn:hover:not(:disabled),
.research-btn:hover:not(:disabled),
.strain-btn:hover:not(:disabled),
.mutation-btn:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.upgrade-btn:disabled,
.research-btn:disabled,
.strain-btn:disabled,
.mutation-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-btn.affordable,
.research-btn.affordable,
.strain-btn.affordable,
.mutation-btn.affordable {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.upgrade-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #ffd700;
}

.upgrade-info {
    font-size: 0.9em;
    color: #aaa;
    margin: 5px 0;
}

.upgrade-cost {
    font-size: 0.9em;
}

.upgrade-owned {
    font-size: 0.85em;
    color: #888;
}

/* Market styles */
.market-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.market-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.market-actions button {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border: none;
    border-radius: 5px;
    color: #1a1a2e;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

.market-actions button:hover {
    transform: scale(1.05);
}

.market-actions button:active {
    transform: scale(0.95);
}

/* DNA Points */
#dna-points {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(147, 51, 234, 0.2);
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

#dna-count {
    color: #a78bfa;
    font-weight: bold;
}

#generate-dna-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 0.85em;
}

#generate-dna-btn:hover {
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}

#generate-dna-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Strain buttons */
.strain-btn {
    background: rgba(147, 51, 234, 0.1);
    border-color: rgba(147, 51, 234, 0.3);
}

.strain-btn:hover:not(:disabled) {
    background: rgba(147, 51, 234, 0.2);
    border-color: rgba(147, 51, 234, 0.5);
}

.strain-btn.affordable {
    border-color: #a78bfa;
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
}

.strain-btn .upgrade-name {
    color: #a78bfa;
}

/* Mutation buttons */
.mutation-btn {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.3);
}

.mutation-btn:hover:not(:disabled) {
    background: rgba(236, 72, 153, 0.2);
    border-color: rgba(236, 72, 153, 0.5);
}

.mutation-btn.affordable {
    border-color: #f472b6;
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.3);
}

.mutation-btn .upgrade-name {
    color: #f472b6;
}

#stats {
    font-size: 0.9em;
    color: #aaa;
}

#stats div {
    margin: 5px 0;
}

footer {
    margin-top: 20px;
    text-align: center;
}

footer button {
    padding: 10px 20px;
    margin: 0 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
}

footer button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#save-status {
    display: block;
    margin-top: 10px;
    font-size: 0.85em;
    color: #888;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    #main-display {
        font-size: 2em;
    }

    section {
        padding: 15px;
    }

    .market-actions button {
        min-width: 60px;
        padding: 8px;
        font-size: 0.9em;
    }

    #dna-points {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Progress bars */
.progress-display {
    margin-bottom: 15px;
}

.progress-bar {
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-fill.space-progress {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* Region buttons (Phase 4) */
.region-btn, .eco-btn {
    width: 100%;
    padding: 15px;
    text-align: left;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    cursor: pointer;
    color: #e0e0e0;
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 10px;
}

.region-btn:hover:not(:disabled), .eco-btn:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

.region-btn.affordable, .eco-btn.affordable {
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.region-btn .upgrade-name, .eco-btn .upgrade-name {
    color: #4ade80;
}

/* Planet buttons (Phase 5) */
.planet-btn, .space-btn {
    width: 100%;
    padding: 15px;
    text-align: left;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    cursor: pointer;
    color: #e0e0e0;
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 10px;
}

.planet-btn:hover:not(:disabled), .space-btn:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.planet-btn.affordable, .space-btn.affordable {
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.planet-btn .upgrade-name, .space-btn .upgrade-name {
    color: #60a5fa;
}

.planet-btn:disabled, .space-btn:disabled,
.region-btn:disabled, .eco-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Achievements */
#achievements-section {
    margin-top: 20px;
}

#achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.achievement {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.5;
}

.achievement.unlocked {
    opacity: 1;
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

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

.achievement-name-small {
    font-weight: bold;
    font-size: 0.9em;
    color: #ffd700;
}

.achievement-desc {
    font-size: 0.75em;
    color: #888;
    margin-top: 3px;
}

/* Achievement popup */
#achievement-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideIn 0.5s ease, slideOut 0.5s ease 2.5s forwards;
}

#achievement-popup.hidden {
    display: none;
}

.achievement-icon {
    font-size: 2em;
}

.achievement-title {
    font-size: 0.8em;
    color: #888;
}

.achievement-name {
    font-weight: bold;
    color: #ffd700;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Purchased state for one-time upgrades */
.research-btn.purchased,
.mutation-btn.purchased,
.eco-btn.purchased,
.space-btn.purchased {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    opacity: 0.7;
}

.research-btn.purchased .upgrade-name,
.mutation-btn.purchased .upgrade-name,
.eco-btn.purchased .upgrade-name,
.space-btn.purchased .upgrade-name {
    color: #4ade80;
}

.research-btn.purchased .upgrade-cost,
.mutation-btn.purchased .upgrade-cost,
.eco-btn.purchased .upgrade-cost,
.space-btn.purchased .upgrade-cost {
    color: #4ade80;
    font-style: italic;
}

/* Honey drip effect on header */
header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 215, 0, 0.5),
        rgba(255, 215, 0, 0.8),
        rgba(255, 215, 0, 0.5),
        transparent
    );
    border-radius: 50%;
}

header {
    position: relative;
    padding-bottom: 15px;
}

/* Section icons */
#actions h2::before { content: '🖱️ '; }
#upgrades h2::before { content: '⬆️ '; }
#research h2::before { content: '🔬 '; }
#market-section h2::before { content: '💰 '; }
#flowers-section h2::before { content: '🌸 '; }
#products-section h2::before { content: '🏭 '; }
#genetics-lab h2::before { content: '🧬 '; }
#mutations h2::before { content: '☣️ '; }
#pollination-index h2::before { content: '🌍 '; }
#regions-section h2::before { content: '🗺️ '; }
#eco-upgrades h2::before { content: '🌱 '; }
#universe-progress h2::before { content: '🚀 '; }
#planets-section h2::before { content: '🪐 '; }
#space-tech h2::before { content: '⚡ '; }
#achievements-section h2::before { content: '🏆 '; }
#stats h2::before { content: '📊 '; }
#rebirth-info h2::before { content: '🔄 '; }
#rebirth-upgrades h2::before { content: '✨ '; }

/* Rebirth tab styles */
#nectar-display {
    padding: 15px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

#nectar-count {
    font-size: 1.5em;
    font-weight: bold;
    color: #a855f7;
}

.nectar-bonus {
    font-size: 0.9em;
    color: #c084fc;
    margin-top: 5px;
}

#rebirth-preview {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

#nectar-gain {
    font-weight: bold;
    color: #a855f7;
}

.rebirth-requirement {
    font-size: 0.85em;
    color: #888;
    margin-top: 5px;
}

#rebirth-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    transition: transform 0.1s, box-shadow 0.1s;
}

#rebirth-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

#rebirth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#rebirth-btn .btn-info {
    display: block;
    font-size: 0.6em;
    font-weight: normal;
    margin-top: 5px;
}

.rebirth-upgrade-btn {
    width: 100%;
    padding: 15px;
    text-align: left;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    cursor: pointer;
    color: #e0e0e0;
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 10px;
}

.rebirth-upgrade-btn:hover:not(:disabled) {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.5);
}

.rebirth-upgrade-btn.affordable {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.rebirth-upgrade-btn .upgrade-name {
    color: #c084fc;
}

.rebirth-upgrade-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Settings button */
#settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.4);
    font-size: 1.3em;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
}

/* Settings popup */
#settings-popup {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    width: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

#settings-popup.hidden {
    display: none;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h3 {
    margin: 0;
    color: #ffd700;
}

.settings-header button {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2em;
    cursor: pointer;
}

.settings-header button:hover {
    color: #fff;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 0.9em;
}

.setting-item input[type="range"] {
    width: 70%;
    vertical-align: middle;
}

#volume-value {
    margin-left: 10px;
    color: #ffd700;
}

.theme-toggle {
    display: flex;
    gap: 5px;
}

.theme-toggle button {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle button.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

.shortcuts-info {
    font-size: 0.85em;
    color: #888;
}

.shortcuts-info div {
    margin: 5px 0;
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #ffd700;
}

/* Offline popup (same as achievement) */
#offline-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #4ade80;
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideIn 0.5s ease, slideOut 0.5s ease 4s forwards;
}

#offline-popup.hidden {
    display: none;
}

/* Daily Reward Popup */
#daily-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#daily-popup.hidden {
    display: none;
}

.daily-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.daily-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.daily-content h3 {
    color: #ffd700;
    margin: 0 0 10px;
    font-size: 1.5em;
}

.daily-streak {
    color: #aaa;
    margin-bottom: 15px;
}

.daily-reward {
    font-size: 1.3em;
    color: #4ade80;
    font-weight: bold;
    margin-bottom: 20px;
}

.daily-content button {
    padding: 12px 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.1s;
}

.daily-content button:hover {
    transform: scale(1.05);
}

/* Tutorial */
#tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#tutorial-overlay.hidden {
    display: none;
}

#tutorial-box {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    position: relative;
    z-index: 3001;
    animation: popIn 0.3s ease;
}

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

.tutorial-header span {
    color: #888;
    font-size: 0.9em;
}

.tutorial-header button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.9em;
}

.tutorial-header button:hover {
    color: #fff;
}

.tutorial-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

#tutorial-box h3 {
    color: #ffd700;
    margin: 0 0 15px;
    font-size: 1.3em;
}

#tutorial-box p {
    color: #e0e0e0;
    margin: 0 0 20px;
    line-height: 1.5;
}

.tutorial-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.tutorial-buttons button {
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

#tutorial-next {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #1a1a2e;
}

#tutorial-prev {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.tutorial-buttons button:hover {
    transform: scale(1.05);
}

#tutorial-highlight {
    position: absolute;
    border: 3px solid #ffd700;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    pointer-events: none;
    transition: all 0.3s ease;
    display: none;
}

/* Tooltips */
.tooltip {
    position: relative;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
    margin-bottom: 5px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    #main-display {
        font-size: 1.8em;
    }

    #secondary-display {
        font-size: 1.2em;
    }

    section {
        padding: 12px;
    }

    h2 {
        font-size: 1.1em;
    }

    .market-actions button {
        min-width: 60px;
        padding: 8px;
        font-size: 0.85em;
    }

    #dna-points {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    #tabs {
        flex-wrap: wrap;
        gap: 3px;
    }

    .tab-btn {
        padding: 8px 6px;
        font-size: 0.8em;
        flex: 1 1 30%;
    }

    #bulk-buy {
        gap: 5px;
    }

    .bulk-btn {
        padding: 4px 8px;
        font-size: 0.75em;
    }

    .upgrade-btn, .research-btn, .strain-btn, .mutation-btn,
    .region-btn, .eco-btn, .planet-btn, .space-btn, .rebirth-upgrade-btn {
        padding: 10px;
    }

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

    .upgrade-info, .upgrade-cost, .upgrade-owned {
        font-size: 0.8em;
    }

    #collect-btn {
        padding: 15px;
        font-size: 1.1em;
    }

    footer button {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    #settings-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1em;
    }

    #settings-popup {
        width: 250px;
        left: 10px;
        bottom: 70px;
    }

    #achievements-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .achievement {
        padding: 8px;
    }

    .achievement-icon-small {
        font-size: 1.2em;
    }

    .achievement-name-small {
        font-size: 0.8em;
    }

    #achievement-popup, #offline-popup {
        right: 10px;
        left: 10px;
        padding: 10px 15px;
    }

    .daily-content {
        padding: 20px;
        margin: 10px;
    }

    .tooltip-text {
        display: none;
    }
}

/* Prevent text selection on game elements */
#game-container {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
    .upgrade-btn, .research-btn, .strain-btn, .mutation-btn,
    .region-btn, .eco-btn, .planet-btn, .space-btn, .rebirth-upgrade-btn {
        min-height: 60px;
    }

    .tab-btn {
        min-height: 44px;
    }

    .bulk-btn {
        min-height: 36px;
        min-width: 44px;
    }
}

/* Light theme - Warm Honey Aesthetic */
body.light-theme {
    background: linear-gradient(135deg, #fef9e7 0%, #fdebd0 50%, #fae5c3 100%);
    color: #5d4037;
}

body.light-theme::before {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 193, 7, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(255, 160, 0, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 70% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
}

/* Sections and cards */
body.light-theme section {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 248, 225, 0.9) 100%);
    border: 1px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body.light-theme section h2 {
    color: #8b4513;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* All button types - base styling */
body.light-theme .upgrade-btn,
body.light-theme .research-btn,
body.light-theme .strain-btn,
body.light-theme .mutation-btn,
body.light-theme .region-btn,
body.light-theme .eco-btn,
body.light-theme .planet-btn,
body.light-theme .space-btn,
body.light-theme .rebirth-upgrade-btn {
    color: #4a3728;
    background: linear-gradient(145deg, rgba(255, 248, 230, 0.95) 0%, rgba(255, 236, 179, 0.9) 100%);
    border: 1px solid rgba(255, 193, 7, 0.5);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.light-theme .upgrade-btn:hover,
body.light-theme .research-btn:hover,
body.light-theme .strain-btn:hover,
body.light-theme .mutation-btn:hover,
body.light-theme .region-btn:hover,
body.light-theme .eco-btn:hover,
body.light-theme .planet-btn:hover,
body.light-theme .space-btn:hover,
body.light-theme .rebirth-upgrade-btn:hover {
    background: linear-gradient(145deg, rgba(255, 243, 205, 1) 0%, rgba(255, 224, 130, 0.95) 100%);
    border-color: rgba(255, 160, 0, 0.7);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Upgrade button (gold/honey accent) */
body.light-theme .upgrade-btn {
    border-left: 3px solid #ffc107;
}

/* Research button (purple/genetics) */
body.light-theme .research-btn,
body.light-theme .strain-btn {
    border-left: 3px solid #9c27b0;
}

/* Mutation button (pink) */
body.light-theme .mutation-btn {
    border-left: 3px solid #e91e63;
}

/* Region/Market button (green) */
body.light-theme .region-btn,
body.light-theme .eco-btn {
    border-left: 3px solid #4caf50;
}

/* Space button (blue) */
body.light-theme .planet-btn,
body.light-theme .space-btn {
    border-left: 3px solid #2196f3;
}

/* Rebirth button (special amber) */
body.light-theme .rebirth-upgrade-btn {
    border-left: 3px solid #ff8f00;
    background: linear-gradient(145deg, rgba(255, 243, 224, 0.95) 0%, rgba(255, 224, 178, 0.9) 100%);
}

/* Disabled buttons */
body.light-theme .upgrade-btn:disabled,
body.light-theme .research-btn:disabled,
body.light-theme .strain-btn:disabled,
body.light-theme .mutation-btn:disabled,
body.light-theme .region-btn:disabled,
body.light-theme .eco-btn:disabled,
body.light-theme .planet-btn:disabled,
body.light-theme .space-btn:disabled,
body.light-theme .rebirth-upgrade-btn:disabled {
    background: rgba(245, 245, 245, 0.7);
    color: #9e9e9e;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: none;
}

/* Text elements */
body.light-theme .upgrade-info,
body.light-theme .upgrade-owned,
body.light-theme .upgrade-cost,
body.light-theme #honey-per-second,
body.light-theme #stats,
body.light-theme .section-info {
    color: #6d4c41;
}

body.light-theme .upgrade-name,
body.light-theme .btn-name {
    color: #5d4037;
}

body.light-theme .upgrade-cost {
    color: #f57f17;
}

/* Tab buttons */
body.light-theme .tab-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 248, 225, 0.8) 100%);
    color: #795548;
    border: 1px solid rgba(255, 193, 7, 0.3);
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.1);
}

body.light-theme .tab-btn:hover {
    background: linear-gradient(145deg, rgba(255, 248, 225, 0.9) 0%, rgba(255, 236, 179, 0.95) 100%);
    border-color: rgba(255, 193, 7, 0.5);
}

body.light-theme .tab-btn.active {
    background: linear-gradient(145deg, #ffc107 0%, #ffb300 100%);
    color: #5d4037;
    border-color: #ff8f00;
    box-shadow: 0 3px 8px rgba(255, 193, 7, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Settings popup */
body.light-theme #settings-popup {
    background: linear-gradient(145deg, #fffdf7 0%, #fef5e7 100%);
    border: 2px solid rgba(255, 193, 7, 0.5);
    box-shadow: 0 10px 40px rgba(139, 69, 19, 0.25);
}

body.light-theme #settings-popup h2 {
    color: #8b4513;
    border-bottom: 2px solid rgba(255, 193, 7, 0.4);
}

body.light-theme .setting-item label,
body.light-theme .shortcuts-info {
    color: #6d4c41;
}

body.light-theme .setting-item input[type="range"] {
    background: rgba(255, 193, 7, 0.3);
}

body.light-theme .setting-item select,
body.light-theme .setting-item input[type="text"] {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #5d4037;
}

/* Achievements */
body.light-theme .achievement {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 248, 225, 0.85) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}

body.light-theme .achievement.unlocked {
    background: linear-gradient(145deg, rgba(255, 248, 225, 0.95) 0%, rgba(255, 236, 179, 0.9) 100%);
    border-color: rgba(255, 193, 7, 0.6);
    box-shadow: 0 3px 12px rgba(255, 193, 7, 0.25);
}

body.light-theme .achievement h3 {
    color: #8b4513;
}

body.light-theme .achievement p {
    color: #6d4c41;
}

/* Footer buttons */
body.light-theme footer button {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 248, 225, 0.9) 100%);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #5d4037;
    box-shadow: 0 2px 6px rgba(139, 69, 19, 0.1);
}

body.light-theme footer button:hover {
    background: linear-gradient(145deg, rgba(255, 248, 225, 0.95) 0%, rgba(255, 236, 179, 0.9) 100%);
    border-color: rgba(255, 193, 7, 0.6);
}

body.light-theme #settings-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 248, 225, 0.9) 100%);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #5d4037;
}

body.light-theme #settings-btn:hover {
    background: linear-gradient(145deg, #ffc107 0%, #ffb300 100%);
    border-color: #ff8f00;
}

/* Progress bars */
body.light-theme .progress-bar {
    background: rgba(139, 69, 19, 0.15);
}

body.light-theme .progress-fill {
    background: linear-gradient(90deg, #ffc107 0%, #ffb300 100%);
}

/* Scrollbar */
body.light-theme::-webkit-scrollbar-track {
    background: rgba(255, 248, 225, 0.8);
}

body.light-theme::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffc107 0%, #ff8f00 100%);
    border: 2px solid rgba(255, 248, 225, 0.8);
}

body.light-theme::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffb300 0%, #ff6f00 100%);
}

/* Tooltips */
body.light-theme .tooltip {
    background: linear-gradient(145deg, #fffdf7 0%, #fef5e7 100%);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #5d4037;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

/* Resource display */
body.light-theme #honey-count {
    color: #f57f17;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Notifications/popups */
body.light-theme #offline-popup {
    background: linear-gradient(145deg, #fffdf7 0%, #fef5e7 100%);
    border: 2px solid rgba(255, 193, 7, 0.5);
    color: #5d4037;
    box-shadow: 0 8px 30px rgba(139, 69, 19, 0.3);
}
