body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 30px 15px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: var(--bg-dark);
    color: var(--text-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.main-container, .container {
    background-color: var(--container-dark);
    border-radius: var(--radius);
    box-shadow: 0 8px 12px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.8);
    padding: 30px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--container-border);
    max-width: 900px;
    position: relative; 
}

.header-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--input-border);
    gap: 10px;
}

.header-bar .info-group {
    flex-grow: 1;
    min-width: 150px;
}

.header-bar .info-group.user-email-group {
    flex-basis: 0;
    flex-grow: 2;
}

.header-bar .info-group.balance-group {
    flex-basis: 0;
    flex-grow: 2;
    overflow: visible; 
}

.banner-container {
    position: relative;
    margin-bottom: 25px;
}

.faucet-title-banner {
    max-width: 60%; 
    height: auto; 
    margin: 0 auto;
}

.global-help-icon {
    position: absolute;
    top: -10px;
    right: 10px;
    width: 44px;
    height: 44px;
    background: linear-gradient(145deg, #f1c40f, #f39c12);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 -2px 3px rgba(0,0,0,0.2);
    border: 2px solid #fff;
    transition: all 0.3s ease;
}
.global-help-icon:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 15px rgba(241, 196, 15, 0.5), inset 0 -2px 3px rgba(0,0,0,0.2);
}

.discord-icon {
    position: absolute;
    top: -10px;
    right: calc(11px + 54px);
    width: 44px;
    height: 44px;
    background: #5865F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 -2px 3px rgba(0,0,0,0.2);
    border: 2px solid #fff;
    transition: all 0.3s ease;
}
.discord-icon svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}
.discord-icon:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 15px rgba(88, 101, 242, 0.5), inset 0 -2px 3px rgba(0,0,0,0.2);
}


h1 { 
    color: var(--accent); 
    margin-top: 0; 
    margin-bottom: 20px; 
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.login-form input[type="email"] {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-light);
    border-radius: var(--radius);
    padding: 14px;
    font-size: 1em;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.login-form input[type="email"]::placeholder { color: var(--text-muted); }
.login-form input[type="email"]:focus { outline: none; border-color: var(--focus-border); }

.register-link { 
    font-size: 0.9em; 
    color: var(--text-muted); 
}
.register-link a { 
    color: var(--accent); 
    text-decoration: none; 
    font-weight: 500; 
}
.register-link a:hover { 
    text-decoration: underline; 
}


.info-group {
    display: flex;
    border-radius: var(--radius);
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    width: 100%;
    box-sizing: border-box;
}

.info-group-text {
    flex-grow: 1;
    padding: 14px;
    font-size: 1em;
    text-align: left;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-group-text.credit-balance {
    font-size: 1.2em;
    font-weight: 500;
}
.info-group-text.credit-balance strong {
    color: var(--legendary-color);
    font-weight: 700;
}

.info-group-btn {
    border: none;
    color: white;
    padding: 0 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    flex-shrink: 0;
    font-size: 1em;
}

.info-group-btn.logout {
    background-color: var(--logout-color);
}
.info-group-btn.logout:hover {
    background-color: var(--logout-hover-bg);
}

.info-group-btn.withdraw {
    background-color: var(--withdraw-color);
}
.info-group-btn.withdraw:hover {
    background-color: var(--withdraw-hover-bg);
}


.level-container {
    margin-bottom: 35px;
    margin-top: 15px; 
}

.tabs {
    margin-top: 0;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 0 5px;
}
.level-title {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-light);
}
.level-title #level-number {
    font-weight: 700;
    color: var(--accent);
}
.level-help-icon {
    background-color: var(--input-bg);
    color: var(--text-muted);
    border: 1px solid var(--input-border);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}
.level-help-icon:hover {
    background-color: #444;
    color: var(--text-light);
    transform: scale(1.1);
}
.level-progress-bar {
    width: 100%;
    height: 24px;
    background-color: var(--bg-dark);
    border-radius: 12px;
    border: 1px solid var(--input-border);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}
.level-progress-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-grad-end), var(--accent));
    border-radius: 12px;
    transition: width 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 0 10px var(--accent);
}
.level-xp-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.referral-info { 
    padding: 10px; 
    text-align: left; 
}
.referral-info p { 
    margin-bottom: 20px; 
    text-align: center; 
}

.referral-link-group { 
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}
#referral-link-input { 
    flex-grow: 1; 
    background-color: var(--input-bg); 
    border: none; 
    color: var(--text-light); 
    padding: 14px; 
    font-size: 1em; 
    user-select: all; 
}
#referral-link-input:focus { 
    outline: none; 
}
#copy-ref-link-btn { 
    background: linear-gradient(145deg, var(--primary-grad-start), var(--primary-grad-end)); 
    color: white; 
    border: none; 
    padding: 0 25px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: all 0.3s; 
}
#copy-ref-link-btn:hover { 
    background: linear-gradient(145deg, var(--primary-hover), #4a00e0); 
}
#copy-ref-link-btn:active { 
    transform: scale(0.95); 
}
.ref-stats { 
    display: flex; 
    justify-content: space-around; 
    margin-top: 30px; 
    background-color: var(--bg-dark); 
    padding: 20px; 
    border-radius: var(--radius); 
}
.ref-stats div { 
    text-align: center; 
}
.ref-stats span { 
    display: block; 
    font-size: 1.8em; 
    font-weight: bold; 
    color: var(--accent); 
}
