/* Golden Spatula Architect Styling */
.architect-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f172a 100%) !important;
    z-index: 100001 !important;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.architect-overlay.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Blueprint grid pattern */
.architect-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: blueprintGrid 30s linear infinite;
    pointer-events: none;
    opacity: 0.3;
}

@keyframes blueprintGrid {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

.architect-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

.architect-header {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-bottom: 3px solid #00d4ff;
    padding: 30px 40px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.architect-title {
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 12px;
    color: #00d4ff;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.architect-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.spatula-budget {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 212, 255, 0.05)),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(0, 212, 255, 0.1) 2px,
            rgba(0, 212, 255, 0.1) 4px
        );
    padding: 15px 30px;
    border: 2px solid #00d4ff;
    border-radius: 8px;
    box-shadow: 
        inset 0 2px 10px rgba(0, 212, 255, 0.1),
        0 5px 20px rgba(0, 0, 0, 0.3);
}

.budget-icon {
    font-size: 2rem;
    color: var(--prestige-gold);
    animation: budgetPulse 2s ease-in-out infinite;
}

@keyframes budgetPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.2); }
}

.budget-amount {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--prestige-gold);
    /* Removed monospace font to match game style */
}

.budget-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.architect-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.blueprint-workspace {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    height: 100%;
}

.upgrade-library {
    background: 
        linear-gradient(145deg, rgba(0, 0, 0, 0.6), rgba(0, 212, 255, 0.05)),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 8px,
            rgba(0, 212, 255, 0.05) 8px,
            rgba(0, 212, 255, 0.05) 16px
        );
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.library-header {
    color: #00d4ff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #00d4ff;
    padding-bottom: 10px;
}

.upgrade-tier {
    margin-bottom: 25px;
}

.tier-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tier-cost {
    background: var(--prestige-gold);
    color: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

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

.upgrade-component {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;  /* Slightly more padding */
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem !important;  /* Goldilocks size - not too big, not too small */
    user-select: none;
}

.upgrade-component:hover:not(.purchased) {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.upgrade-component.purchased {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.1), rgba(0, 100, 0, 0.05));
    border-color: rgba(0, 255, 0, 0.5);
    opacity: 0.7;
    cursor: default;
}

.upgrade-component.purchased .upgrade-icon {
    filter: grayscale(50%);
}

.upgrade-purchased {
    color: #00ff00;
    font-weight: bold;
    font-size: 0.9rem;
}

.upgrade-component:active {
    transform: translateX(3px);
}

.upgrade-component.insufficient {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-component.insufficient:hover {
    transform: none;
}

.upgrade-icon {
    font-size: 1rem !important;  /* Normal emoji size */
    width: 18px;
    text-align: center;
    flex-shrink: 0;  /* Don't let it shrink */
}

.upgrade-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.75rem !important;  /* Match component size */
    line-height: 1.2;
    margin-left: 4px;  /* Slightly more gap from icon to avoid overlap */
}

.upgrade-cost {
    color: var(--prestige-gold);
    font-weight: 600;
    font-size: 0.7rem !important;  /* Readable cost text */
    flex-shrink: 0;
}

.restaurant-blueprint {
    background: 
        linear-gradient(145deg, rgba(0, 0, 0, 0.4), rgba(0, 212, 255, 0.02)),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 19px,
            rgba(0, 212, 255, 0.1) 20px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 19px,
            rgba(0, 212, 255, 0.1) 20px
        );
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.blueprint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00d4ff;
}

.blueprint-title {
    color: #00d4ff;
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.blueprint-stats {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-value {
    color: #00d4ff;
    font-weight: 600;
    /* Removed monospace font to match game style */
}

.blueprint-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    min-height: 400px;
}

.blueprint-zone {
    background: 
        linear-gradient(145deg, rgba(0, 212, 255, 0.05), rgba(0, 0, 0, 0.3)),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 3px,
            rgba(0, 212, 255, 0.05) 3px,
            rgba(0, 212, 255, 0.05) 6px
        );
    border: 2px dashed rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.4s ease;
    position: relative;
    min-height: 180px;
    overflow: visible;  /* Allow tooltips to show outside */
}

.blueprint-zone:hover {
    border-color: #00d4ff;
    background: 
        linear-gradient(145deg, rgba(0, 212, 255, 0.1), rgba(0, 0, 0, 0.3)),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 3px,
            rgba(0, 212, 255, 0.1) 3px,
            rgba(0, 212, 255, 0.1) 6px
        );
}

.zone-title {
    color: #00d4ff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.installed-upgrade {
    background: linear-gradient(135deg, var(--success), #22c55e);
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
    animation: upgradeInstalled 0.5s ease-out;
    position: relative;
}

.installed-upgrade .remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: #ff6b6b;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.installed-upgrade:hover .remove-btn {
    opacity: 1;
}

@keyframes upgradeInstalled {
    0% { transform: scale(0.8) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.upgrade-icon-installed {
    font-size: 1.1rem;
}

.drop-zone {
    position: absolute;
    inset: 0;
    background: rgba(0, 212, 255, 0.1);
    border: 2px dashed #00d4ff;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #00d4ff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Upgrade Detail Panel */
.upgrade-detail-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.98), rgba(0, 212, 255, 0.15));
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 25px;
    min-width: 400px;
    max-width: 500px;
    z-index: 1000;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.4);
    animation: detailPanelSlide 0.3s ease-out;
}

@keyframes detailPanelSlide {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.detail-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.detail-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
}

.detail-title h3 {
    color: #00d4ff;
    font-size: 1.5rem;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.detail-cost {
    color: var(--prestige-gold);
    font-size: 1rem;
    font-weight: 600;
}

.detail-description {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.stackable-note {
    color: var(--prestige-gold);
    font-style: italic;
    font-size: 0.9rem;
}

.permanent-note {
    color: #4ade80;
    font-style: italic;
    font-size: 0.95rem;
    font-weight: 600;
    display: block;
    margin-top: 10px;
    padding: 8px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 6px;
    text-align: center;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.detail-benefits {
    margin-bottom: 25px;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.benefit-item {
    color: #4ade80;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 15px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 6px;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.detail-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.detail-cancel,
.detail-confirm {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.detail-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.2);
}

.detail-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.detail-confirm {
    background: linear-gradient(135deg, #00d4ff, #00a8d6);
    color: white;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.detail-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.architect-footer {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-top: 3px solid #00d4ff;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.footer-stats {
    display: flex;
    gap: 25px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-stat-value {
    color: #00d4ff;
    font-weight: 600;
    /* Removed monospace font to match game style */
}

.finalize-button {
    padding: 16px 40px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
    border: 2px solid #00d4ff;
    border-radius: 10px;
    color: #00d4ff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: not-allowed;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

.finalize-button.ready {
    background: linear-gradient(135deg, #00d4ff, #00a8d6);
    color: white;
    opacity: 1;
    cursor: pointer;
    animation: finalizePulse 3s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

@keyframes finalizePulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.4); 
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 0 50px rgba(0, 212, 255, 0.6); 
    }
}

.finalize-button:hover.ready {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 35px rgba(0, 212, 255, 0.5);
}

/* Fancy Tooltip Styling */
.architect-tooltip {
    position: fixed;  /* Changed to fixed to prevent clipping */
    bottom: auto;
    top: 50%;  /* Will be set by JS for proper positioning */
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 1), rgba(0, 212, 255, 0.15)),  /* Less transparent - full black */
        radial-gradient(circle at top left, rgba(0, 212, 255, 0.2), transparent 50%);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 18px;
    min-width: 280px;
    max-width: 350px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 100010;  /* Higher z-index to be above everything */
    box-shadow: 
        0 0 40px rgba(0, 212, 255, 0.3),
        0 20px 40px rgba(0, 0, 0, 0.8),  /* Darker shadow */
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Tooltip arrow */
.architect-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #00d4ff;
}

.architect-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(0, 0, 0, 1);  /* Solid black to match background */
}

/* Shop Tab Integration Styles */
.architect-shop-wrapper {
    padding: 20px;
    background: var(--bg-primary);
    min-height: 600px;
}

.architect-shop-wrapper .architect-header {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 215, 0, 0.1));
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.architect-shop-wrapper .architect-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.architect-shop-wrapper .architect-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.architect-shop-wrapper .spatula-budget {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
}

.architect-shop-wrapper .budget-icon {
    font-size: 1.5rem;
}

.architect-shop-wrapper .budget-amount {
    font-size: 1.4rem;
    color: #ffd700;
    font-weight: bold;
}

.architect-shop-wrapper .budget-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Upgrade Categories */
.upgrade-categories {
    display: grid;
    gap: 30px;
}

.upgrade-category {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
}

.category-title {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.upgrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* Upgrade Items */
.architect-upgrade-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.architect-upgrade-item:hover:not(.purchased):not(.locked) {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
    border-color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.architect-upgrade-item.purchased {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.1), rgba(0, 100, 0, 0.05));
    border-color: rgba(0, 255, 0, 0.5);
    cursor: default;
}

.architect-upgrade-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.architect-upgrade-item .upgrade-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.architect-upgrade-item .upgrade-info {
    flex: 1;
}

.architect-upgrade-item .upgrade-name {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.architect-upgrade-item .upgrade-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.architect-upgrade-item .upgrade-cost {
    font-size: 0.9rem;
}

.architect-upgrade-item .cost-label {
    color: #ffd700;
    font-weight: bold;
}

.architect-upgrade-item .purchased-label {
    color: #00ff00;
    font-weight: bold;
}

/* Footer */
.architect-footer {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
}

.architect-note {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
}

/* Upgrade Confirmation Modal */
.upgrade-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upgrade-confirm-overlay.show {
    opacity: 1;
}

.upgrade-confirm-modal {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.upgrade-confirm-overlay.show .upgrade-confirm-modal {
    transform: scale(1);
}

.upgrade-confirm-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.upgrade-confirm-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.upgrade-confirm-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.upgrade-confirm-content {
    margin-bottom: 25px;
}

.upgrade-confirm-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.upgrade-confirm-cost,
.upgrade-confirm-balance,
.upgrade-confirm-remaining {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.upgrade-confirm-cost {
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.cost-label,
.balance-label,
.remaining-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.cost-value {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1rem;
}

.balance-value {
    color: var(--text-primary);
    font-weight: bold;
}

.remaining-value {
    color: #00ff00;
    font-weight: bold;
}

.upgrade-confirm-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.upgrade-confirm-cancel,
.upgrade-confirm-purchase {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.upgrade-confirm-cancel {
    background: rgba(100, 100, 100, 0.3);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.upgrade-confirm-cancel:hover {
    background: rgba(100, 100, 100, 0.5);
    transform: translateY(-2px);
}

.upgrade-confirm-purchase {
    background: linear-gradient(135deg, #00d4ff, #00a8d6);
    color: white;
    border: 1px solid #00d4ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upgrade-confirm-purchase:hover {
    background: linear-gradient(135deg, #00e5ff, #00b8e6);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

.installed-upgrade {
    position: relative;
}

.installed-upgrade:hover .architect-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.tooltip-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    animation: tooltipIconPulse 2s ease-in-out infinite;
}

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

.tooltip-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00d4ff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    letter-spacing: 0.5px;
}

.tooltip-description {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
}

.tooltip-cost {
    color: var(--prestige-gold);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.tooltip-permanent {
    color: #4ade80;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    animation: permanentGlow 2s ease-in-out infinite;
}

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

/* Tooltip positioning when below element */
.architect-tooltip.tooltip-below::before {
    top: auto;
    bottom: 100%;
    border-top: none;
    border-bottom: 10px solid #00d4ff;
}

.architect-tooltip.tooltip-below::after {
    top: auto;
    bottom: 100%;
    transform: translateX(-50%) translateY(2px);
    border-top: none;
    border-bottom: 8px solid rgba(0, 0, 0, 1);
}

/* Glow effect on hover */
.installed-upgrade:hover {
    filter: brightness(1.1);
    box-shadow: 
        0 4px 20px rgba(74, 222, 128, 0.4),
        0 0 40px rgba(0, 212, 255, 0.2);
}

/* Adjust position for tooltips near edges */
.blueprint-zone:first-child .architect-tooltip {
    left: 10px;
    transform: translateX(0) scale(0.8);
}

.blueprint-zone:first-child .installed-upgrade:hover .architect-tooltip {
    transform: translateX(0) scale(1);
}

.blueprint-zone:last-child .architect-tooltip {
    left: auto;
    right: 10px;
    transform: translateX(0) scale(0.8);
}

.blueprint-zone:last-child .installed-upgrade:hover .architect-tooltip {
    transform: translateX(0) scale(1);
}

/* Scrollbar styling */
.architect-content::-webkit-scrollbar,
.upgrade-library::-webkit-scrollbar {
    width: 10px;
}

.architect-content::-webkit-scrollbar-track,
.upgrade-library::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

.architect-content::-webkit-scrollbar-thumb,
.upgrade-library::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #00d4ff, var(--border-primary));
    border-radius: 5px;
    border: 1px solid var(--bg-primary);
}

/* Infinite Upgrade System Styles */
.infinite-upgrade-system {
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    background: rgba(26, 31, 58, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Live Spatula Counter */
.spatula-display-header {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.05));
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.1);
}

.spatula-counter-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    padding-bottom: 30px; /* Add padding to prevent overlap */
}

.spatula-icon {
    font-size: 2.5em;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1) rotate(10deg);
        filter: brightness(1.3) drop-shadow(0 0 10px gold);
    }
}

.spatula-count {
    font-size: 2.8em;
    font-weight: bold;
    color: #ffd700;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Orbitron', monospace;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.spatula-count.updating {
    animation: countPulse 0.3s ease;
}

@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); color: #fff; }
}

.spatula-label {
    font-size: 1.2em;
    color: #ffd700;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.passive-rate {
    position: absolute;
    bottom: -5px; /* Moved down 5px from 5px to 0px */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em;
    color: #4ade80;
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(74, 222, 128, 0.3);
    font-weight: bold;
    white-space: nowrap;
    animation: floatUp 2s ease-in-out infinite;
}

@keyframes floatUp {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

.system-status {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 8px;
    border-left: 4px solid #00d4ff;
}

.system-status h3 {
    color: #00d4ff;
    margin: 0 0 10px 0;
    font-size: 1.4em;
}

.transition-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.system-active {
    margin-top: 15px;
    padding: 15px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.unlock-passive {
    margin-top: 10px;
}

.unlock-passive button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6b35, #ff8e53);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unlock-passive button:hover {
    background: linear-gradient(135deg, #ff8e53, #ffa572);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.tier-section {
    margin-bottom: 40px;
}

.tier-section h4 {
    color: #ffd700;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    font-size: 1.2em;
}

.upgrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.infinite-upgrade-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.6));
    border-radius: 8px;
    border: 1px solid rgba(71, 85, 105, 0.4);
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.infinite-upgrade-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.15);
}

.infinite-upgrade-card.maxed {
    border-color: rgba(74, 222, 128, 0.5);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(16, 185, 129, 0.1));
}

.infinite-upgrade-card.unaffordable {
    opacity: 0.6;
    border-color: rgba(239, 68, 68, 0.3);
}

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

.upgrade-header h5 {
    margin: 0;
    color: #e2e8f0;
    font-size: 1.1em;
    font-weight: 600;
}

.upgrade-level {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.upgrade-description {
    color: #94a3b8;
    font-size: 0.9em;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.upgrade-effect {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 15px;
    border-left: 3px solid #10b981;
}

.upgrade-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upgrade-cost {
    color: #ffd700;
    font-weight: bold;
    font-size: 0.9em;
}

.upgrade-buy-btn {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.upgrade-buy-btn:hover {
    background: linear-gradient(135deg, #0284c7, #0891b2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.upgrade-buy-btn.disabled,
.upgrade-buy-btn:disabled {
    background: rgba(107, 114, 128, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.max-indicator {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Transition note styling */
.transition-note {
    color: #00d4ff;
    font-style: italic;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Recommended upgrade highlighting */
.architect-upgrade-item.recommended {
    border: 2px solid #fbbf24 !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05)) !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3), 0 0 40px rgba(251, 191, 36, 0.1) !important;
    animation: recommended-pulse 2s ease-in-out infinite;
    position: relative;
}

.architect-upgrade-item.recommended::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #fbbf24);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.5;
    animation: border-glow 3s ease-in-out infinite;
}

.recommended-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

@keyframes recommended-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.3), 0 0 40px rgba(251, 191, 36, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.5), 0 0 60px rgba(251, 191, 36, 0.2);
    }
}

@keyframes border-glow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
}
