body {
    font-family: 'Kavoon', cursive;
    background-color: #3e2723;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    user-select: none;
    overflow: hidden;
    background-image: url('background.png');
    background-size: cover;
}

#game-container {
    display: flex;
    gap: 40px;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
}

#left-panel, #right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#cookie-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#cookie-stats {
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

#cookie-stats p {
    margin: 0.2em 0;
}

#cookie-container {
    position: relative;
}

#cookie {
    width: 300px;
    height: 300px;
    cursor: pointer;
    transition: transform 0.1s ease;
    filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.5));
}

#cookie:active {
    transform: scale(0.95);
}

#right-panel {
    background-color: rgba(85, 57, 49, 0.8);
    border: 5px solid #5d4037;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5) inset;
}

#right-panel h2 {
    text-align: center;
    font-size: 2.5em;
    margin-top: 0;
    color: #ffd54f;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

#store-header {
    display: none;
}

#upgrades-container {
    overflow-y: auto;
    padding-right: 10px;
}

.upgrade {
    border: 3px solid #795548;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    background-color: #8d6e63;
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upgrade:hover {
    background-color: #a1887f;
}

.upgrade.disabled {
    background-color: #5d4037;
    color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.7;
}

.upgrade.disabled:hover {
    background-color: #5d4037;
}

.upgrade-details {
    flex-grow: 1;
}

.upgrade-details .name {
    font-size: 1.5em;
}

.upgrade-details .cost, .upgrade-details .cps {
    font-size: 1em;
    color: #ffcc80;
}

.upgrade .owned {
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.click-indicator {
    position: absolute;
    pointer-events: none;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px black;
    animation: floatUp 1s ease-out forwards;
}

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

#bottom-left-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.bottom-left-buttons {
    display: flex;
    gap: 10px;
}

#apk-btn,
#codes-btn,
#mute-btn {
    font-family: 'Kavoon', cursive;
    background-color: #5d4037;
    color: #fff;
    border: 2px solid #795548;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#apk-btn {
    display: none; /* Hidden by default, shown by JS if install is possible */
}

#apk-btn:hover,
#codes-btn:hover,
#mute-btn:hover {
    background-color: #a1887f;
}

.hidden {
    display: none;
}

#admin-panel {
    position: relative;
    background-color: rgba(30, 30, 30, 0.9);
    border: 2px solid #ffd54f;
    border-radius: 10px;
    padding: 15px;
    color: white;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(255, 213, 79, 0.5);
}

#admin-panel.dragging {
    position: fixed;
}

#admin-panel h3 {
    margin-top: 0;
    text-align: center;
    color: #ffd54f;
    cursor: move;
}

#admin-panel p {
    font-size: 0.8em;
    color: #ccc;
    text-align: center;
    margin-bottom: 10px;
}

#admin-panel button {
    font-family: 'Kavoon', cursive;
    background-color: #5d4037;
    color: white;
    border: 1px solid #795548;
    padding: 8px 12px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

#admin-panel button:hover {
    background-color: #a1887f;
}

#admin-panel .admin-control {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

#admin-panel input {
    font-family: 'Kavoon', cursive;
    flex-grow: 1;
    width: 100px;
    background-color: #3e2723;
    border: 1px solid #795548;
    color: white;
    padding: 8px;
    border-radius: 5px;
}

#admin-panel input::placeholder {
    color: #9e9e9e;
}

/* Codes Modal */
#codes-modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

#codes-modal-content {
    background-color: #6d4c41;
    color: white;
    margin: auto;
    padding: 30px;
    border: 5px solid #5d4037;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

#codes-modal-content h3 {
    font-size: 2em;
    color: #ffd54f;
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

#close-codes-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #ffcc80;
    font-size: 35px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

#close-codes-modal:hover,
#close-codes-modal:focus {
    color: #fff;
    text-decoration: none;
}

.code-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#code-input {
    font-family: 'Kavoon', cursive;
    flex-grow: 1;
    background-color: #3e2723;
    border: 1px solid #795548;
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 1em;
}

#code-input::placeholder {
    color: #9e9e9e;
}

#submit-code-btn {
    font-family: 'Kavoon', cursive;
    background-color: #a1887f;
    color: white;
    border: 1px solid #5d4037;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1em;
    transition: background-color 0.2s;
}

#submit-code-btn:hover {
    background-color: #8d6e63;
}

#code-message {
    margin-top: 15px;
    font-size: 1.1em;
    min-height: 20px;
}

#recent-code-display {
    margin-top: 20px;
    color: #ffcc80;
    font-size: 0.9em;
    border-top: 1px solid #795548;
    padding-top: 15px;
}

#recent-code-display p {
    margin: 0;
}

#last-code-used {
    font-weight: bold;
    color: #fff;
}