body {
    font-family: sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    margin: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

main {
    max-width: 800px;
    width: 100%;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

h1, h2 {
    color: #e0e0e0;
    text-align: center;
    margin-bottom: 15px;
}

/* Notification Area */
#notification-area {
    margin-bottom: 15px;
}

.notification {
    background-color: #2d3a4a;
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

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

.notification-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

.notification-dismiss:hover {
    color: #fff;
}

.notification-dismiss:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.notification-title {
    color: #ffd700;
    font-size: 1.1em;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.notification-content {
    color: #f0f0f0;
    font-size: 1.2em;
    margin: 0;
}

.dismiss-all-button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: #6c757d;
    color: #fff;
    border: 2px solid #ffd700;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
}

.dismiss-all-button:hover {
    background-color: #5a6268;
}

.dismiss-all-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.game-stats, .game-actions, footer nav {
    text-align: center;
    margin-bottom: 20px;
}

p {
    font-size: 1.2em;
    margin: 5px 0;
}

button {
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin: 5px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #45a049;
}

button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

#gather-mana-button {
    font-size: 1.5em;
    padding: 15px 30px;
    background-color: #007bff; /* Blue */
}

#gather-mana-button:hover {
    background-color: #0056b3;
}

footer {
    width: 100%;
    max-width: 800px;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* Screen Reader Only Class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Buildings Container */
#buildings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 8px;
}

/* Individual Building Item */
.building-item {
    background-color: #4a4a4a;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.building-item .building-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 5px;
    color: #007bff;
}

.building-item .building-description {
    font-size: 0.9em;
    color: #ccc;
    margin-bottom: 5px;
}

/* Buy All Affordable Upgrades Button */
.buy-all-upgrades-btn {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: #9b59b6;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.buy-all-upgrades-btn:hover {
    background-color: #8e44ad;
}

.buy-all-upgrades-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.building-item .building-production-effective {
    font-size: 0.9em;
    color: #4CAF50;
    font-weight: bold;
    margin-bottom: 5px;
}

.building-item .building-synergy {
    font-size: 0.85em;
    color: #ffd700;
    margin-bottom: 5px;
}

.building-item .building-flavor {
    font-size: 0.85em;
    color: #888;
    font-style: italic;
    margin-bottom: 10px;
}

.building-item .building-owned,
.building-item .building-cost {
    font-size: 1em;
    margin-bottom: 5px;
}

.building-item .buy-building-button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    font-size: 1.1em;
}

/* Affordability States */
.buy-building-button.can-buy {
    background-color: #4CAF50; /* Green */
}

.buy-building-button.can-buy:hover {
    background-color: #45a049;
}

.buy-building-button.cannot-buy {
    background-color: #6c757d; /* Grey */
    cursor: not-allowed;
}

.buy-building-button.cannot-buy:hover {
    background-color: #6c757d; /* No change on hover when disabled */
}

/* Upgrades Container */
#upgrades-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 8px;
}

/* Individual Upgrade Item */
.upgrade-item {
    background-color: #4a4a4a;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.upgrade-item .upgrade-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 5px;
    color: #9b59b6;
}

.upgrade-item .upgrade-description {
    font-size: 0.9em;
    color: #ccc;
    margin-bottom: 5px;
}

.upgrade-item .upgrade-flavor {
    font-size: 0.85em;
    color: #888;
    font-style: italic;
    margin-bottom: 10px;
}

.upgrade-item .upgrade-cost {
    font-size: 1em;
    margin-bottom: 5px;
}

.upgrade-item .buy-upgrade-button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    font-size: 1.1em;
}

/* Upgrade Affordability States */
.buy-upgrade-button.can-buy {
    background-color: #9b59b6;
}

.buy-upgrade-button.can-buy:hover {
    background-color: #8e44ad;
}

.buy-upgrade-button.cannot-buy {
    background-color: #6c757d;
    cursor: not-allowed;
}

.buy-upgrade-button.cannot-buy:hover {
    background-color: #6c757d;
}

/* Purchased Upgrades Container */
#purchased-upgrades-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 8px;
}

/* Purchased Upgrade Item */
.purchased-upgrade-item {
    background-color: #2d3a4a;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #007bff;
}

.purchased-upgrade-item .upgrade-name {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 5px;
    color: #007bff;
}

.purchased-upgrade-item .upgrade-description {
    font-size: 0.9em;
    color: #ccc;
    margin-bottom: 0;
}

/* Focus styles for headings */
h2:focus {
    outline: 2px solid #007bff;
    outline-offset: 4px;
}

/* Events Log */
#events-log {
    background-color: #3a3a3a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    min-height: 50px;
}

.flavor-event {
    font-size: 0.95em;
    color: #aaa;
    font-style: italic;
    margin: 8px 0;
    padding: 8px 12px;
    background-color: #4a4a4a;
    border-left: 3px solid #9b59b6;
    border-radius: 4px;
}

/* Interactive Events */
.interactive-event {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-left-color: #ffd700;
    background-color: #3a3a2a;
    animation: slideIn 0.3s ease-out;
}

.interactive-event-text {
    flex: 1;
}

.interactive-event-button {
    flex-shrink: 0;
    padding: 6px 16px;
    font-size: 0.9em;
    background-color: #ffd700;
    color: #1a1a1a;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    min-height: 36px;
    transition: background-color 0.2s;
}

.interactive-event-button:hover {
    background-color: #ffed4a;
}

.interactive-event-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.interactive-event-result {
    border-left-color: #7cfc00;
    background-color: #2a3a2a;
    color: #7cfc00;
}

/* Story Milestones */
.story-milestone {
    border-left-color: #9b59b6;
    border-left-width: 4px;
    background-color: #2a2a3a;
    color: #d4c4e8;
    font-style: normal;
    line-height: 1.5;
}

/* Game Panels (toggled via navigation) */
.game-panel {
    margin-top: 20px;
    padding: 15px;
    background-color: #333;
    border-radius: 8px;
    border: 1px solid #444;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 600px) {
    body {
        margin: 10px;
    }

    main {
        padding: 15px;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.2em;
    }

    #gather-mana-button {
        font-size: 1.2em;
        padding: 12px 24px;
        width: 100%;
        max-width: 300px;
    }

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

    footer nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    footer nav button {
        flex: 1 1 calc(33% - 10px);
        min-width: 90px;
        font-size: 0.85em;
        padding: 8px 5px;
    }

    #buildings-container,
    #upgrades-container,
    #purchased-upgrades-container {
        grid-template-columns: 1fr;
    }

    .building-item,
    .upgrade-item {
        padding: 12px;
    }

    .building-item .building-name,
    .upgrade-item .upgrade-name {
        font-size: 1.1em;
    }

    p {
        font-size: 1em;
    }

    #mana-display {
        font-size: 1.3em;
    }
}

#proficiency-display {
    font-size: 0.9em;
    color: #9b8ed4;
    margin-top: 2px;
}

#active-spells-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
}

.main-spell-tag {
    display: inline-block;
    background-color: #3a2a4a;
    border: 1px solid #9b59b6;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.85em;
    color: #d4a0ff;
}

/* Tablet Responsive Styles */
@media screen and (min-width: 601px) and (max-width: 900px) {
    #buildings-container,
    #upgrades-container {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    button {
        min-height: 44px;
        min-width: 44px;
    }

    #gather-mana-button {
        min-height: 60px;
    }
}

/* Bulk Buy Controls */
.bulk-buy-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.bulk-buy-controls span {
    color: #aaa;
    font-size: 0.9em;
}

.bulk-buy-btn {
    padding: 5px 12px;
    font-size: 0.85em;
    background-color: #3a3a4a;
    border: 1px solid #5a5a6a;
    color: #ccc;
    border-radius: 4px;
    cursor: pointer;
    min-width: 44px;
    min-height: 32px;
    transition: background-color 0.2s, border-color 0.2s;
}

.bulk-buy-btn:hover {
    background-color: #4a4a5a;
}

.bulk-buy-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.bulk-buy-btn[aria-checked="true"] {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
    font-weight: bold;
}

/* Game Notifications (runestones, wishing well) */
.game-notification {
    background-color: #2d3a4a;
    border-color: #4CAF50;
}

.game-notification.notification-warning {
    background-color: #4a3a2a;
    border-color: #ff8c00;
}

/* Ranking Upgrades (inline, inside the main upgrade list) */
#ranking-upgrades-inline {
    margin-top: 2em;
}

#ranking-upgrades-inline .ranking-info {
    margin-bottom: 1.5em;
    color: #aaa;
    font-style: italic;
}

.ranking-category {
    margin-bottom: 2em;
}

.ranking-category h3,
.ranking-category h4 {
    border-bottom: 1px solid #444;
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}

.ranking-category .unlock-info {
    font-size: 0.8em;
    color: #888;
    font-weight: normal;
}

.ranking-upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.ranking-upgrade-item {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 0.75em 1em;
    background: #2a2a3a;
    border-radius: 6px;
    border: 1px solid #3a3a4a;
}

.ranking-upgrade-item .upgrade-name {
    font-weight: bold;
    min-width: 150px;
}

.ranking-upgrade-item .upgrade-effect {
    color: #7cfc00;
    min-width: 80px;
}

.ranking-upgrade-item .upgrade-cost {
    color: #ffd700;
    flex-grow: 1;
}

.ranking-upgrade-item .purchased-label {
    color: #888;
    font-style: italic;
}

.ranking-upgrade-item.purchased {
    background: #1a2a1a;
    border-color: #2a3a2a;
    opacity: 0.8;
}

.buy-ranking-upgrade-btn {
    padding: 0.4em 1em;
    background: #4a4a6a;
    border: 1px solid #5a5a7a;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.buy-ranking-upgrade-btn:hover:not(:disabled) {
    background: #5a5a7a;
}

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

.locked-message {
    color: #888;
    font-style: italic;
    padding: 1em;
    background: #1a1a2a;
    border-radius: 4px;
}

.ranking-upgrade-item.rank-locked {
    opacity: 0.55;
    border-color: #3a3a4a;
}

.rank-locked-message {
    color: #c89b3c;
    font-style: italic;
    font-size: 0.9em;
}

.category-complete {
    color: #7cfc00;
    font-style: italic;
    text-align: center;
    padding: 0.5em;
}

/* Wishing Well Styles */
.wishing-well-status {
    background: #1a1a2a;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1em;
}

.wishing-well-active {
    background: #2a3a4a;
    border: 2px solid #ffd700;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1em;
}

.wishing-well-effects h3 {
    margin-bottom: 0.5em;
}

.wishing-well-effect-item {
    background: #2a2a3a;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 0.5em;
}

.effect-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75em 1em;
    background: #3a4a5a;
    border: 1px solid #5a6a7a;
    border-radius: 4px;
    color: #f0f0f0;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

.effect-button:hover:not(:disabled) {
    background: #4a5a6a;
}

.effect-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.effect-name {
    font-weight: bold;
}

.effect-cost {
    color: #ffd700;
}

.effect-description {
    margin-top: 0.5em;
    color: #aaa;
    font-size: 0.9em;
}

/* Runestones Styles */
#runestone-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 0;
    padding: 10px 0;
    gap: 10px;
}

#runestone-container:empty {
    display: none;
    padding: 0;
}

.runestone {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.5s;
    box-shadow: 0 0 20px currentColor;
}

.runestone.visible {
    opacity: 1;
    animation: runestone-float 2s ease-in-out infinite;
}

.runestone.fading {
    opacity: 0;
}

.runestone-glyph {
    font-size: 2em;
    color: inherit;
}

@keyframes runestone-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Runestone Colors - Positive */
.runestone-green { background: linear-gradient(135deg, #2d5a2d, #4a9a4a); color: #7cfc00; }
.runestone-blue { background: linear-gradient(135deg, #2d3a5a, #4a6a9a); color: #00bfff; }
.runestone-white { background: linear-gradient(135deg, #aaa, #fff); color: #fff; }
.runestone-pink { background: linear-gradient(135deg, #5a2d4a, #9a4a7a); color: #ff69b4; }
.runestone-gold { background: linear-gradient(135deg, #5a4a2d, #9a7a4a); color: #ffd700; }
.runestone-silver { background: linear-gradient(135deg, #4a4a4a, #8a8a8a); color: #c0c0c0; }
.runestone-purple { background: linear-gradient(135deg, #3a2d5a, #6a4a9a); color: #9370db; }

/* Runestone Colors - Negative */
.runestone-red { background: linear-gradient(135deg, #5a2d2d, #9a4a4a); color: #ff4444; }
.runestone-black { background: linear-gradient(135deg, #1a1a1a, #3a3a3a); color: #666; }
.runestone-orange { background: linear-gradient(135deg, #5a3a2d, #9a5a4a); color: #ff8c00; }
.runestone-brown { background: linear-gradient(135deg, #3a2d1a, #5a4a3a); color: #8b4513; }
.runestone-yellow { background: linear-gradient(135deg, #5a5a2d, #9a9a4a); color: #ffd700; }
.runestone-grey { background: linear-gradient(135deg, #3a3a3a, #5a5a5a); color: #888; }

.runestone:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px currentColor;
}

.runestone:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Runestone Effect Display */
#runestone-effect-display {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9em;
}

#runestone-effect-display[hidden] {
    display: none;
}

#runestone-effect-display.effect-positive {
    background: rgba(45, 90, 45, 0.9);
    border: 2px solid #7cfc00;
    color: #7cfc00;
}

#runestone-effect-display.effect-negative {
    background: rgba(90, 45, 45, 0.9);
    border: 2px solid #ff4444;
    color: #ff4444;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #2a2a2a;
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
}

.modal-content h3 {
    color: #ffd700;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 10px;
}

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

/* Challenges Panel */
.challenges-info {
    color: #aaa;
    font-style: italic;
    margin-bottom: 15px;
}

.active-challenge-banner {
    background: linear-gradient(135deg, #2a2a1a, #3a3a2a);
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.active-challenge-banner p {
    margin: 5px 0;
}

#active-challenge-name {
    color: #ffd700;
    font-size: 1.1em;
}

#active-challenge-progress {
    color: #7cfc00;
}

#active-challenge-timer {
    color: #ff8c00;
    font-weight: bold;
}

#abandon-challenge-button {
    margin-top: 10px;
    background-color: #6a4a4a;
    font-size: 0.9em;
}

#abandon-challenge-button:hover {
    background-color: #7a5a5a;
}

.challenge-item {
    background-color: #3a3a3a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #ffd700;
}

.challenge-item.completed {
    border-left-color: #7cfc00;
    opacity: 0.85;
}

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

.challenge-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffd700;
    margin: 0;
}

.challenge-item.completed .challenge-name {
    color: #7cfc00;
}

.challenge-reward-badge {
    background-color: #4a3a5a;
    color: #9b59b6;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    margin: 0;
}

.challenge-description {
    color: #ccc;
    margin: 5px 0;
}

.challenge-restriction {
    color: #ff8c00;
    font-size: 0.9em;
    margin: 5px 0;
}

.challenge-reward {
    color: #7cfc00;
    font-size: 0.9em;
    margin: 5px 0;
}

.challenge-active-label {
    color: #ffd700;
    font-weight: bold;
    font-style: italic;
}

.start-challenge-button {
    margin-top: 10px;
    background-color: #ffd700;
    color: #1a1a1a;
    font-weight: bold;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    min-height: 36px;
}

.start-challenge-button:hover {
    background-color: #ffed4a;
}

.start-challenge-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.challenge-complete-notification {
    background-color: #2d4a2d;
    border-color: #7cfc00;
}

.challenge-complete-notification .notification-title {
    color: #ffd700;
}

.modal-buttons button {
    min-width: 80px;
}

/* Prestige Store Actions */
#prestige-store-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #444;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#prestige-store-actions button {
    padding: 12px 20px;
    font-size: 1em;
}

#refund-crystals-button {
    background-color: #4a4a6a;
}

#refund-crystals-button:hover:not(:disabled) {
    background-color: #5a5a7a;
}

#refund-crystals-button:disabled {
    background-color: #3a3a4a;
    color: #888;
}

#reset-prestige-button {
    background-color: #6a4a4a;
}

#reset-prestige-button:hover {
    background-color: #7a5a5a;
}

/* Prestige Warning */
#prestige-warning {
    background-color: #4a3a2a;
    border-left: 4px solid #ffd700;
    padding: 15px;
    margin-bottom: 15px;
    font-style: italic;
}

/* Transcendence Panel */
.transcendence-description {
    color: #aaa;
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.5;
}

.transcendence-status {
    background: linear-gradient(135deg, #1a1a2a, #2a1a2a);
    border: 1px solid #9b59b6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.transcendence-status p {
    margin: 5px 0;
}

#transcendence-essence {
    color: #d4a0ff;
    font-weight: bold;
    font-size: 1.1em;
}

#transcendence-count {
    color: #9b59b6;
}

#transcendence-pending {
    color: #ffd700;
    font-weight: bold;
}

.transcend-button {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #9b59b6, #6a1b9a);
    color: #fff;
    border: 2px solid #d4a0ff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.transcend-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #8e44ad, #7b1fa2);
}

.transcend-button:disabled {
    background: #3a3a4a;
    border-color: #555;
    color: #888;
    cursor: not-allowed;
}

.transcend-button:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

.transcendence-upgrade-item {
    background-color: #2a2a3a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #d4a0ff;
}

.transcendence-upgrade-item.purchased {
    border-left-color: #7cfc00;
    opacity: 0.85;
}

.transcendence-upgrade-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #d4a0ff;
    margin-bottom: 5px;
}

.transcendence-upgrade-item.purchased .transcendence-upgrade-name {
    color: #7cfc00;
}

.transcendence-upgrade-desc {
    color: #ccc;
    margin: 5px 0;
}

.transcendence-upgrade-flavor {
    color: #888;
    font-style: italic;
    font-size: 0.9em;
    margin: 5px 0;
}

.transcendence-upgrade-cost {
    color: #d4a0ff;
    font-weight: bold;
    margin: 8px 0;
}

.transcendence-buy-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.transcendence-buy-btn.can-afford {
    background-color: #9b59b6;
    color: #fff;
}

.transcendence-buy-btn.can-afford:hover {
    background-color: #8e44ad;
}

.transcendence-buy-btn.cannot-afford {
    background-color: #3a3a4a;
    color: #888;
    cursor: not-allowed;
}

.transcendence-buy-btn:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Tutorial */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.tutorial-box {
    background: linear-gradient(135deg, #1a1a2a, #2a2a3a);
    border: 2px solid #9b59b6;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 0 30px rgba(155, 89, 182, 0.3);
}

.tutorial-text {
    color: #e0e0e0;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.tutorial-button {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-size: 1.1em;
    background-color: #9b59b6;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    min-height: 44px;
    transition: background-color 0.2s;
}

.tutorial-button:hover {
    background-color: #8e44ad;
}

.tutorial-button:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

.tutorial-highlight {
    animation: tutorial-pulse 1s ease-in-out 3;
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.6);
}

@keyframes tutorial-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(155, 89, 182, 0.3); }
    50% { box-shadow: 0 0 30px rgba(155, 89, 182, 0.8); }
}

