/* Styles for dark mode links */
a { color: #8ab4f8; }
a:visited { color: #c58af9; }

/* General body styles */
body {
    font-family: 'Times New Roman', serif;
    margin: 0;
    background-color: #222;
    color: #ddd;
}

/* Audio Player Styles */
#audio-player-container {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background-color: #333;
    border: 2px solid #555;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
}
#audio-player-container button {
    background: #d4b450;
    border: 1px solid #a98f40;
    color: #222;
    cursor: pointer;
    width: 40px;
    height: 40px;
    font-family: 'Times New Roman', serif;
    font-size: 20px;
}
#progress-bar-container {
    width: 200px; /* Increased width */
    height: 10px;
    background-color: #555;
    position: relative;
}
#progress-fill {
    height: 100%;
    background-color: #777; /* Lighter grey fill */
    width: 0%; /* Starts at 0, updated by script */
}
#sol-runner {
    position: absolute;
    bottom: 0;
    left: 0; /* Will be updated by script */
    width: 70px;  /* Increased size */
    height: 50px; /* Increased size */
    transform: translateX(-50%); /* Center the gif on the progress line */
}
#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 5px;
    background: #555;
    outline: none;
}
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #d4b450;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .store-container {
        flex-direction: column;
    }

    .products {
        padding-right: 0;
    }

    .cart {
        margin-top: 2em;
    }

    img, iframe {
        max-width: 100%;
        height: auto;
    }

    .main-container {
        display: flex;
        flex-direction: column;
    }

    .column {
        width: 100%;
    }
}

/* Desktop Layout */
@media (min-width: 769px) {
    .main-container {
        display: flex;
    }

    .column {
        flex: 1;
        padding: 1em;
    }
}

/* Store Layout */
.store-container { display: flex; padding: 2em; }
.products { flex: 3; padding-right: 2em; }
.cart { flex: 1; border: 2px solid #555; padding: 1em; background-color: #333; }
.product-item { margin-bottom: 2em; }
.product-item img { border: 2px solid #555; }
.add-to-cart-btn { font-family: 'Times New Roman', serif; background-color: #d4b450; color: #222; border: 1px solid #a98f40; padding: 5px 10px; cursor: pointer; }

/* Cart Styles */
#cart-items li { margin-bottom: 0.5em; }
#checkout-btn { width: 100%; padding: 10px; margin-top: 1em; background-color: #4CAF50; color: white; border: none; cursor: pointer; font-size: 1rem; }

/* Checkout Modal Styles */
.modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); }
.modal-content { background-color: #333; color: #ddd; margin: 20% auto; padding: 20px; border: 2px solid #555; width: 80%; max-width: 400px; text-align: center; }
.close-btn { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }

/* Command Panel Styles */
#command-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #333;
    border: 2px solid #555;
    padding: 2em;
    z-index: 10001;
    font-family: 'Times New Roman', serif;
    color: #ddd;
}

#command-panel h2 {
    color: #d4b450;
    margin-top: 0;
}

#command-panel button {
    background: #d4b450;
    border: 1px solid #a98f40;
    color: #222;
    cursor: pointer;
    padding: 10px 20px;
    font-family: 'Times New Roman', serif;
    font-size: 1rem;
    display: block;
    width: 100%;
    margin-bottom: 1em;
}

#command-panel button:hover {
    background: #a98f40;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #555;
    margin-bottom: 1em;
}

.panel-header h2 {
    margin: 0;
}

.panel-close-btn {
    background: #555;
    border: 2px solid #a98f40;
    color: #ddd;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.panel-close-btn:hover {
    background: #a98f40;
}

.panel-section {
    margin-bottom: 1em;
}

.panel-section h3 {
    color: #d4b450;
    border-bottom: 1px solid #555;
    padding-bottom: 0.5em;
}

/* Clicker Game Styles */
#clickable-icon:active {
    transform: scale(0.98);
}

.upgrade-btn {
    background: #d4b450;
    border: 1px solid #a98f40;
    color: #222;
    cursor: pointer;
    padding: 10px 20px;
    font-family: 'Times New Roman', serif;
    font-size: 1rem;
    margin-top: 1em;
}

.upgrade-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
}

/* Tension Gauge Styles */
#tension-gauge-container {
    width: 100%;
    height: 20px;
    background-color: #555;
    border: 2px solid #a98f40;
    margin-top: 1em;
}

#tension-gauge-fill {
    width: 0%;
    height: 100%;
    background-color: #008080; /* Teal */
}

.clicker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tps-particle {
    position: absolute;
    color: #d4b450;
    font-size: 1rem;
    pointer-events: none;
    animation: fade-up 1s ease-out forwards;
}

@keyframes fade-up {
    to {
        transform: translateY(-50px);
        opacity: 0;
    }
}

#open-panel-btn {
    display: none;
    position: fixed;
    bottom: 15px;
    left: 15px;
    z-index: 9998;
}

/* Custom Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 10002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
}

.custom-modal-content {
    background-color: #333;
    color: #ddd;
    margin: 20% auto;
    padding: 20px;
    border: 2px solid #555;
    width: 80%;
    max-width: 400px;
    text-align: center;
    font-family: 'Times New Roman', serif;
}

.custom-modal-content button {
    background: #d4b450;
    border: 1px solid #a98f40;
    color: #222;
    cursor: pointer;
    padding: 10px 20px;
    font-family: 'Times New Roman', serif;
    font-size: 1rem;
    margin: 0.5em;
}
