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

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #2a1810, #4a2c1a, #6b3e27);
    color: #f4e4bc;
    min-height: 100vh;
    overflow-x: hidden;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 20px;
    min-height: 100vh;
}

.top-section {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #8b4513;
    border-radius: 15px;
    padding: 20px;
}

.combined-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 20px;
}

.game-menu {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #8b4513;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.menu-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.menu-section h4 {
    color: #ff6b9d;
    margin-bottom: 5px;
    font-size: 1em;
}

.resource-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Mystical Merchant's Orb - DISABLED: Ads not implemented yet */
/*
.mystical-orb {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #ff6b9d, #9b59b6);
    border-radius: 50%;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    cursor: pointer;
    z-index: 1000;
    animation: orbFloat 3s ease-in-out infinite, orbGlow 2s ease-in-out infinite alternate;
    transition: all 0.3s ease;
}

.mystical-orb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
}

.mystical-orb::before {
    content: '🔮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    animation: orbSpin 4s linear infinite;
}

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

@keyframes orbGlow {
    0% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
    100% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 107, 157, 0.4); }
}

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

.orb-menu {
    position: fixed;
    bottom: 120px;
    right: 30px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 20px;
    min-width: 300px;
    z-index: 1001;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.orb-menu.show {
    transform: translateX(0);
    opacity: 1;
}

.orb-menu h3 {
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
}

.orb-menu p {
    color: #d4c4ac;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.9em;
}
*/

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

.title {
    font-size: 2.5em;
    color: #ff6b9d;
    text-shadow: 0 0 20px #ff6b9d;
    margin-bottom: 10px;
}

.stats {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255, 107, 157, 0.1);
    border: 2px solid #ff6b9d;
    border-radius: 10px;
    padding: 15px;
    margin: 5px;
    text-align: center;
    min-width: 150px;
}

.stat-value {
    font-size: 1.5em;
    color: #ff6b9d;
    font-weight: bold;
}

.brewing-area {
    text-align: center;
    margin-bottom: 40px;
}

.cauldron {
    width: 200px;
    height: 200px;
    background: radial-gradient(ellipse at center, #4a4a4a 30%, #2a2a2a 70%, #1a1a1a);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    margin: 20px auto;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
    border: 4px solid #8b4513;
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
    overflow: hidden;
}

.cauldron:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255, 107, 157, 0.5);
}

.cauldron:active {
    transform: scale(0.95);
}

.cauldron::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 40px;
    background: linear-gradient(45deg, #9b59b6, #e74c3c, #f39c12, #2ecc71);
    border-radius: 50%;
    animation: bubble 3s infinite;
    opacity: 0.8;
}

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

.click-effect {
    position: absolute;
    pointer-events: none;
    font-size: 24px;
    font-weight: bold;
    color: #ff6b9d;
    animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px);
    }
}

.resource-display {
    display: flex;
    gap: 15px;
    align-items: center;
}

.resource {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    min-width: 80px;
}

.resource-name {
    font-size: 0.8em;
    color: #d4c4ac;
    margin-bottom: 2px;
}

.resource-amount {
    font-size: 1.1em;
    font-weight: bold;
    color: #ff6b9d;
}

.upgrades {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #8b4513;
    border-radius: 10px;
    overflow: hidden;
}

.upgrade-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #8b4513;
}

.upgrade-tab {
    flex: 1;
    padding: 12px 8px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-right: 1px solid #8b4513;
    color: #d4c4ac;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85em;
    font-weight: bold;
    text-align: center;
}

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

.upgrade-tab:hover {
    background: rgba(255, 107, 157, 0.1);
    color: #ff6b9d;
}

.upgrade-tab.active {
    background: rgba(255, 107, 157, 0.2);
    color: #ff6b9d;
    box-shadow: inset 0 -3px 0 #ff6b9d;
}

.upgrade-content {
    padding: 15px;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
}

.upgrade-category {
    display: none;
}

.upgrade-category.active {
    display: block;
}

.upgrade-category h3 {
    color: #ff6b9d;
    margin-bottom: 15px;
    text-align: center;
}

.upgrade {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade:hover {
    background: rgba(255, 107, 157, 0.1);
    border-color: #ff6b9d;
}

.upgrade.affordable {
    border-color: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.upgrade-name {
    font-weight: bold;
    color: #f4e4bc;
    margin-bottom: 5px;
}

.upgrade-description {
    font-size: 0.9em;
    color: #d4c4ac;
    margin-bottom: 8px;
}

.upgrade-cost {
    color: #f39c12;
    font-weight: bold;
}

.upgrade-owned {
    color: #2ecc71;
    font-size: 0.9em;
}

.save-controls {
    text-align: center;
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid #3498db;
    border-radius: 10px;
}

.save-button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

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

.export-btn { background: #3498db; color: white; }
.import-btn { background: #2ecc71; color: white; }
.delete-btn { background: #e74c3c; color: white; }

/* Ad system styles - DISABLED: Ads not implemented yet */
/*
.ads-section {
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid #3498db;
    border-radius: 10px;
    text-align: center;
}

.ad-button {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    margin: 5px;
}

.ad-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

.ad-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
*/

.ascension-section {
    background: rgba(155, 89, 182, 0.1);
    border: 2px solid #9b59b6;
    border-radius: 10px;
    text-align: center;
}

.ascension-button {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.ascension-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
}

.ascension-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.automation-info {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.click-frenzy {
    animation: frenzy 0.5s infinite alternate;
}

@keyframes frenzy {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(2deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.automated {
    animation: pulse 2s infinite;
}

/* Achievement System Styles */
.achievement-stats {
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
    flex-wrap: wrap;
}

.achievement-stats div {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ffd700;
    margin: 3px;
    min-width: 100px;
    font-size: 0.9em;
}

.achievement-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.achievement-category {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #8b4513;
    border-radius: 10px;
    padding: 15px;
}

.achievement-category h4 {
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
}

.achievement-item {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.achievement-item.tier-bronze { border-left: 4px solid #cd7f32; }
.achievement-item.tier-silver { border-left: 4px solid #c0c0c0; }
.achievement-item.tier-gold { border-left: 4px solid #ffd700; }
.achievement-item.tier-platinum { border-left: 4px solid #e5e4e2; }
.achievement-item.tier-diamond { border-left: 4px solid #b9f2ff; }

.achievement-icon {
    font-size: 24px;
    margin-right: 12px;
    min-width: 30px;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: bold;
    color: #f4e4bc;
    margin-bottom: 4px;
}

.achievement-description {
    font-size: 0.9em;
    color: #d4c4ac;
    margin-bottom: 8px;
}

.achievement-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

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

.progress-text {
    font-size: 0.8em;
    color: #d4c4ac;
    min-width: 80px;
}

.achievement-completed {
    color: #2ecc71;
    font-weight: bold;
    font-size: 0.9em;
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
}

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

.achievement-notification .achievement-icon {
    font-size: 32px;
}

.achievement-notification .achievement-content {
    flex: 1;
}

.achievement-notification .achievement-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 2px;
}

.achievement-notification .achievement-name {
    font-weight: bold;
    color: #8b4513;
    margin-bottom: 2px;
}

.achievement-notification .achievement-description {
    font-size: 0.9em;
    color: #666;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-menu {
        flex-direction: column;
        gap: 15px;
    }
    
    .menu-section {
        text-align: center;
    }
    
    .achievement-categories {
        grid-template-columns: 1fr;
    }
    
    /* Mystical orb responsive styles - DISABLED: Ads not implemented yet */
    /*
    .mystical-orb {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
    
    .orb-menu {
        bottom: 90px;
        right: 20px;
        min-width: 250px;
    }
    */
}

@media (max-width: 768px) {
    .game-container {
        padding: 15px;
        gap: 15px;
    }
    
    .header .title {
        font-size: 2em;
    }
    
    .combined-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .stat {
        min-width: auto;
    }
    
    .resource-bar {
        flex-wrap: wrap;
    }
    
    .achievement-stats {
        flex-direction: column;
    }
    
    .achievement-stats div {
        min-width: auto;
    }
    
    /* Mystical orb mobile responsive styles - DISABLED: Ads not implemented yet */
    /*
    .mystical-orb {
        width: 50px;
        height: 50px;
    }
    
    .orb-menu {
        bottom: 70px;
        right: 10px;
        min-width: 200px;
    }
    */
}