:root {
    --primary-bg: #1a1a2e;
    --secondary-bg: #16213e;
    --card-bg: #1f2847;
    --accent-color: #0f3460;
    --primary-text: #e94560;
    --secondary-text: #dcdcdc;
    --gold-color: #f9c74f;
    --success-color: #90be6d;
    --error-color: #f94144;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Poppins', sans-serif; background: var(--primary-bg); color: var(--secondary-text); display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow-x: hidden; }
.container { width: 100%; max-width: 480px; min-height: 100vh; background: var(--secondary-bg); display: flex; flex-direction: column; overflow: hidden; position: relative; box-shadow: 0 0 30px rgba(0, 0, 0, 0.5); }
.auth-container { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; padding: 2rem; text-align: center; }
.auth-container h1 { color: var(--gold-color); font-size: 2.5rem; margin-bottom: 1rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.auth-container p { margin-bottom: 2rem; font-size: 1.1rem; }
.auth-form { width: 100%; display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.auth-form input { padding: 1rem; border: none; border-radius: 8px; background: rgba(255, 255, 255, 0.1); color: white; font-size: 1rem; }
.auth-form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.auth-button { padding: 1rem; border: none; border-radius: 8px; background: var(--gold-color); color: var(--primary-bg); font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s; }
.auth-button:hover { transform: scale(1.05); }
.auth-toggle { color: var(--gold-color); cursor: pointer; text-decoration: underline; }
.message { color: white; padding: 0.75rem; border-radius: 8px; margin-bottom: 1rem; }
.message.error { background: var(--error-color); }
.message.success { background: var(--success-color); }
header { padding: 1rem; display: flex; justify-content: space-between; align-items: center; background: var(--card-bg); position: sticky; top: 0; z-index: 10; }
#balance-display { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 600; color: var(--gold-color); background: var(--accent-color); padding: 0.5rem 1rem; border-radius: 20px; }
#balance-display .coin-icon { width: 28px; height: 28px; }
#username-display { font-size: 1rem; font-weight: 600; }
#username-display a { color: var(--primary-text); text-decoration: none; margin-left: 10px; }
main { flex-grow: 1; overflow-y: auto; padding: 1rem; }
nav { display: flex; justify-content: space-around; background: var(--card-bg); padding: 0.5rem 0; border-top: 1px solid var(--accent-color); position: sticky; bottom: 0; z-index: 10; }
nav button { background: none; border: none; color: var(--secondary-text); padding: 0.75rem; font-size: 0.8rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 80px; border-radius: 8px; transition: background-color 0.2s, color 0.2s; }
nav button.active { color: var(--gold-color); }
nav button:hover { background-color: var(--accent-color); }
#tap-screen-content { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; gap: 2rem; text-align: center; }
#tap-button { width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, #f9d423 0%, #f9c74f 100%); border: 8px solid #f8b400; box-shadow: 0 0 40px rgba(249, 199, 79, 0.7), inset 0 0 20px rgba(255,255,255,0.4); cursor: pointer; display: flex; justify-content: center; align-items: center; transition: transform 0.1s ease-out; user-select: none; }
#tap-button:active { transform: scale(0.95); }
#tap-button img { width: 150px; height: 150px; pointer-events: none; }
.tap-feedback { position: absolute; font-size: 2.5rem; font-weight: bold; color: var(--gold-color); opacity: 0; animation: fade-up 1s ease-out; pointer-events: none; text-shadow: 0 0 5px black; }
@keyframes fade-up { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-60px); } }
.screen-title { font-size: 1.8rem; color: var(--primary-text); margin-bottom: 1.5rem; text-align: center; }
.card { background: var(--card-bg); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.card-list .card { display: flex; align-items: center; gap: 1rem; }
.card-list .card-icon { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.card-content { flex-grow: 1; }
.card-title { font-size: 1.1rem; font-weight: 600; color: white; }
.card-description { font-size: 0.9rem; opacity: 0.8; margin: 4px 0; }
.card-reward, .card-price { display: flex; align-items: center; gap: 0.25rem; font-weight: 600; color: var(--gold-color); }
.action-button { padding: 0.75rem 1.5rem; border: none; border-radius: 8px; background: var(--primary-text); color: white; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s, background-color 0.2s; flex-shrink: 0; }
.action-button:hover { transform: scale(1.05); }
.action-button:disabled { background-color: #555; cursor: not-allowed; transform: none; opacity: 0.7; }
.access-course-btn { background: var(--success-color); text-decoration: none; color: white; display: inline-flex; align-items: center; justify-content: center; }
#bonus-screen-content .card { text-align: center; }
#bonus-timer { font-size: 1.2rem; margin: 1rem 0; color: var(--primary-text); font-weight: 600; }
#toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); color: white; padding: 1rem 1.5rem; border-radius: 8px; transition: bottom 0.5s ease; z-index: 1000; text-align: center; }
#toast.show { bottom: 100px; }
.loader { border: 4px solid #f3f3f3; border-radius: 50%; border-top: 4px solid var(--gold-color); width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 2rem auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.admin-container { padding: 2rem; width: 100%; max-width: 960px; min-height: auto; margin: 0 auto; }
.admin-container h1 { text-align: center; color: var(--gold-color); margin-bottom: 2rem; }
.admin-section { background: var(--card-bg); padding: 1.5rem; border-radius: 12px; margin-bottom: 2rem; }
.admin-section h2 { color: var(--primary-text); margin-bottom: 1rem; border-bottom: 2px solid var(--accent-color); padding-bottom: 0.5rem; }
table { width: 100%; border-collapse: collapse; color: var(--secondary-text); }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--accent-color); }
th { color: var(--gold-color); }
.admin-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem;}
.admin-form input, .admin-form textarea, .admin-form select { width: 100%; padding: 0.75rem; border: none; border-radius: 8px; background: rgba(255, 255, 255, 0.1); color: white; font-size: 1rem; }
.delete-btn { background: var(--error-color); padding: 0.5rem 1rem; font-size: 0.9rem; }
.edit-btn { background: var(--gold-color); color: var(--primary-bg); padding: 0.5rem 1rem; font-size: 0.9rem; }