:root {
    --primary-color: #005A9C; --secondary-color: #1877f2; --dark-text: #333; --light-text: #666; --background-color: #f4f7f6; --container-background: #ffffff; --border-color: #e0e0e0; --legendary-color: #ffb703; --rare-color: #0077b6; --uncommon-color: #495057; --common-color: #adb5bd;
}
body {
    font-family: 'Poppins', sans-serif; background-color: var(--background-color); margin: 0; color: var(--dark-text); display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; box-sizing: border-box; position: relative;
}
.language-switcher {
    position: absolute; top: 20px; right: 20px; z-index: 1010; background: var(--container-background); border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); display: flex;
}
.language-switcher button {
    background: transparent; border: none; padding: 8px 12px; font-weight: 600; cursor: pointer; color: var(--light-text); transition: all 0.2s ease-in-out;
}
.language-switcher button.active { background-color: var(--primary-color); color: white; }
.language-switcher button:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.language-switcher button:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

.main-container {
    display: flex; width: 100%; max-width: 1200px; background: var(--container-background); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.05); overflow: hidden;
}
.info-column { flex-basis: 55%; padding: 40px; box-sizing: border-box; }
.auth-column { flex-basis: 45%; background-color: #f9f9f9; padding: 40px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }

.info-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px;
}
.logo {
    width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 3px solid var(--container-background); box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.social-links a {
    margin: 0 0 0 12px; display: inline-block;
}
.social-links svg {
    width: 24px; height: 24px; fill: var(--light-text); transition: fill 0.2s;
}
.social-links a:hover svg { fill: var(--primary-color); }

.main-headline { font-size: 32px; font-weight: 600; margin-top: 10px; margin-bottom: 30px; }
.section { margin-bottom: 30px; }
.section h3 { font-size: 20px; border-bottom: 2px solid var(--primary-color); padding-bottom: 8px; margin-bottom: 15px; }
.section h4 { font-size: 16px; font-weight: 600; margin-top: 20px; margin-bottom: 10px; }
.how-it-works .step { display: flex; align-items: center; margin-bottom: 15px; }
.step-number { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background-color: var(--primary-color); color: white; font-weight: 700; margin-right: 15px; flex-shrink: 0; }
.rewards-list { list-style: none; padding-left: 0; }
.rewards-list li { padding-left: 25px; position: relative; margin-bottom: 8px; color: var(--light-text); }
.rewards-list li::before { content: '⭐'; position: absolute; left: 0; top: 0; }
.rewards-note { font-size: 14px; color: var(--light-text); margin-top: 20px; }

#auth-container { width: 100%; max-width: 400px; background: transparent; box-shadow: none; padding: 0; }
.form-container, #social-login { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
h2 { color: #1c1e21; margin-top: 0; text-align: center; }
input, select { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid var(--border-color); border-radius: 6px; box-sizing: border-box; font-family: 'Poppins', sans-serif;}
button { padding: 12px; border: none; border-radius: 6px; background-color: var(--secondary-color); color: white; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 10px; transition: background-color 0.2s; }
button.btn-full-width { width: 100%; }
button:hover { background-color: #166fe5; }
button:disabled { background-color: #9dbfec; cursor: not-allowed; }
#social-login { text-align: center; }
#google-login-button { background-color: #ffffff; color: #444; border: 1px solid #ddd; display: inline-flex; justify-content: center; align-items: center; gap: 10px; width: auto; padding: 10px 20px; max-width: 280px;}
.toggle-link { margin-top: 15px; font-size: 14px; text-align: center; }
.toggle-link a { color: var(--secondary-color); text-decoration: none; font-weight: bold; }
label { display: block; text-align: left; font-weight: bold; margin-bottom: 5px; font-size: 14px; }

#app-container, #onboarding-modal, #edit-profile-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(5px); padding: 15px; box-sizing: border-box; overflow-y: auto;
}
#app-container > div, .modal-content {
    background: white; padding: 2.5rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); width: 100%;
}
#verification-message { text-align: center; max-width: 500px; }

#main-app { max-width: 900px; }
.dashboard-header { display: flex; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 20px;}
.welcome-text { margin: 0; font-size: 24px; text-align: left; flex-grow: 1; min-width: 0; }
.dashboard-header > div { display: flex; gap: 10px; margin-left: auto; }
button.secondary-button { background-color: #6c757d; }
button.secondary-button:hover { background-color: #5a6268; }
button.cancel-button { background-color: #f8f9fa; color: var(--dark-text); border: 1px solid var(--border-color); }
button.cancel-button:hover { background-color: #e2e6ea; }

#logout-button, #edit-profile-button { width: auto; padding: 8px 16px; font-size: 14px; margin-top: 0; }
#logout-button { background-color: #fa3e3e; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; gap: 20px; grid-template-areas: "spins timer" "spinner spinner" "extra-spins winnings"; }
.grid-item { background-color: #f9f9f9; padding: 20px; border-radius: 8px; }
.stats-spins { grid-area: spins; }
.stats-timer { grid-area: timer; }
.spinner-area { grid-area: spinner; background-color: transparent; padding: 0; }
.extra-spins { grid-area: extra-spins; }
.winnings-history { grid-area: winnings; }
.grid-item h3 { margin-top: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.stats-spins p, .stats-timer p { font-size: 32px; font-weight: 700; color: var(--primary-color); text-align: center; margin: 10px 0 0; }
#winnings-list { list-style: none; padding: 0; margin: 0; max-height: 150px; overflow-y: auto; }
#winnings-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; }
#winnings-list li:last-child { border-bottom: none; }
#winnings-list li .date { font-size: 12px; color: var(--light-text); }
.task-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px;}
.task-item { color: var(--light-text); text-decoration: none; display: inline-flex; align-items: center; transition: color 0.2s; }
.task-item:hover { color: var(--primary-color); }
.task-icon { margin-right: 8px; }

.modal-content { max-width: 450px; text-align: center; }
.modal-content p { margin: 1rem 0; }

#reward-section { width: 100%; display: flex; flex-direction: column; align-items: center; }
.spinner-container { width: 100%; height: 120px; background-color: #e9ecef; border: 3px solid #dee2e6; border-radius: 10px; overflow: hidden; position: relative; margin-bottom: 20px; }
.spinner-marker { position: absolute; width: 4px; height: 100%; background-color: #e63946; left: 50%; transform: translateX(-50%); z-index: 2; }
.spinner-reel { height: 100%; display: flex; position: absolute; left: 0; top: 0; }
.spinner-item { width: 110px; height: 110px; flex-shrink: 0; margin: 5px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background-color: #fff; border: 2px solid; }
.spinner-item img { width: 50px; height: 50px; margin-bottom: 5px; }
.spinner-item p { font-size: 12px; font-weight: 600; margin: 0; padding: 0 5px; }
.rarity-common { border-color: var(--common-color); }
.rarity-uncommon { border-color: var(--uncommon-color); }
.rarity-rare { border-color: var(--rare-color); }
.rarity-legendary { border-color: var(--legendary-color); }
#message-area { margin-top: 1rem; padding: 1rem; border-radius: 6px; font-weight: bold; color: white; min-height: 24px;}

@media (max-width: 992px) {
    .main-container { flex-direction: column; }
    .info-column, .auth-column { flex-basis: auto; }
    .auth-column { border-top: 1px solid var(--border-color); }
    .main-headline { font-size: 28px; }
    .dashboard-grid { grid-template-columns: 1fr; grid-template-areas: "spins" "timer" "spinner" "extra-spins" "winnings"; }
}
@media (max-width: 480px) {
    body { padding: 0; }
    #app-container { align-items: flex-start; padding-top: 20px; padding-bottom: 20px;}
    .language-switcher { top: 10px; right: 10px; }
    .main-container { border-radius: 0; min-height: 100vh; }
    .info-column, .auth-column { padding: 25px; }
    .main-headline { font-size: 24px; }
    .welcome-text { font-size: 20px; }
    #app-container > div, .modal-content { padding: 1.5rem; }
}
