* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0c0c0d;
  --card-top: #2b2b2f;
  --card-bottom: #26262a;
  --border: rgba(255, 255, 255, 0.05);
  --divider: rgba(255, 255, 255, 0.06);
  --text: #f3f3f4;
  --muted: #9a9aa0;
  --chevron: #8b8b90;
  --blue: #1f80f0;
  --yellow: #f4c430;
  --discord: #5865f2;
}

body {
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  min-height: 100vh;
}

.app {
  width: 100%;
  max-width: 490px;
  margin: 0 auto;
  padding: 20px 18px 28px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.topbar h1 {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.back-btn {
  position: absolute;
  left: 0;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #f2f2f2;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.section-group {
  margin-top: 18px;
}

.section-label {
  font-size: 15px;
  color: #a6a6ac;
  margin: 0 4px 14px;
  font-weight: 400;
}

.card,
.profile-card {
  background: linear-gradient(90deg, var(--card-top) 0%, var(--card-bottom) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.profile-card {
  margin-bottom: 8px;
}

.row {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.profile-row {
  min-height: 100px;
}

.row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.row-text {
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
}

.profile-text h2 {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.profile-text p {
  font-size: 15px;
  color: var(--muted);
  font-weight: 400;
}

.chevron {
  font-size: 32px;
  line-height: 1;
  color: var(--chevron);
  font-weight: 300;
  transform: translateY(-1px);
}

.divider {
  height: 1px;
  background: var(--divider);
  margin-left: 0;
  margin-right: 0;
}

.icon {
  width: 22px;
  height: 22px;
  position: relative;
  flex: 0 0 22px;
}

/* Blue circle for Colours */
.icon.blue {
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.02);
}

/* Person icon */
.icon.person::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: #1f80f0;
  border-radius: 50%;
  top: 1px;
  left: 5px;
}
.icon.person::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 8px;
  background: #1f80f0;
  border-radius: 10px 10px 4px 4px;
  bottom: 1px;
  left: 2px;
}

/* Lock icon */
.icon.lock::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 10px;
  border: 2px solid #f4c430;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  top: 1px;
  left: 5px;
}
.icon.lock::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 11px;
  background: #f4c430;
  border-radius: 3px;
  bottom: 2px;
  left: 4px;
}

/* Bell icon */
.icon.bell::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #f4c430;
  border-radius: 8px 8px 6px 6px;
  top: 2px;
  left: 4px;
  clip-path: path("M 7 0 C 3 0 1 3 1 7 L 1 10 L 0 12 L 14 12 L 13 10 L 13 7 C 13 3 11 0 7 0 Z");
}
.icon.bell::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 3px;
  background: #f4c430;
  border-radius: 999px;
  bottom: 1px;
  left: 8px;
}

/* Moon icon */
.icon.moon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #f4c430;
}
.icon.moon::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card-top);
  top: -1px;
  left: 8px;
}

/* Discord icon circle */
.discord-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--discord);
  position: relative;
  flex: 0 0 64px;
}

.discord-icon::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 22px;
  background: #ffffff;
  border-radius: 16px 16px 12px 12px;
  left: 15px;
  top: 21px;
}

.discord-icon::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 8px;
  border-left: 4px solid var(--discord);
  border-right: 4px solid var(--discord);
  left: 22px;
  top: 28px;
}

/* Toggle */
.switch {
  position: relative;
  width: 58px;
  height: 32px;
  flex: 0 0 58px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: transparent;
}

.slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  top: 3px;
  left: 4px;
  background: #f1f1f1;
}

.switch input:checked + .slider {
  background: #ffffff;
  border-color: #ffffff;
}

.switch input:checked + .slider::before {
  transform: translateX(26px);
  background: #1a1a1a;
}

@media (max-width: 420px) {
  .app {
    padding: 16px 14px 24px;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .row-text {
    font-size: 17px;
  }

  .profile-text h2 {
    font-size: 18px;
  }
}

.extra-settings {
  margin-top: 22px;
}

.danger-text {
  color: #ff4d4f;
}

/* Info icon */
.icon.info::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 4px;
  background: #8db8c8;
}
.icon.info::after {
  content: "i";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -58%);
  font-size: 16px;
  font-weight: 700;
  color: #f4f6f8;
  font-family: Arial, sans-serif;
}

/* Help icon */
.icon.help::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 14px;
  left: 2px;
  top: 3px;
  background: #f0f0f0;
  border-radius: 10px;
}
.icon.help::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  left: 5px;
  bottom: 1px;
  background: #f0f0f0;
  clip-path: polygon(0 0, 100% 0, 30% 100%);
}

/* Trash icon */
.icon.trash::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 14px;
  left: 5px;
  top: 5px;
  border: 1.8px solid #9ec3d2;
  border-top: none;
  border-radius: 0 0 3px 3px;
}
.icon.trash::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  left: 4px;
  top: 3px;
  background: #9ec3d2;
  border-radius: 2px;
  box-shadow:
    4px 5px 0 -1px #9ec3d2,
    0 5px 0 -1px #9ec3d2,
    -4px 5px 0 -1px #9ec3d2;
}

.discord-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: 0 0 64px;
}

.app {
  padding-top: 25px;
}

/* make settings widgets slightly smaller */
.section-group .card,
.profile-card {
  border-radius: 18px;
}

.section-group .card .row,
.profile-card .profile-row {
  min-height: 56px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.section-group .card {
  padding-top: 2px;
  padding-bottom: 2px;
}

.row-text,
.profile-text h2,
.profile-text p,
.section-label {
  font-size: 0.95rem;
}

.icon {
  transform: scale(0.92);
}

.chevron {
  font-size: 18px;
}

/* footer specific */
html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 130px;
}

@media (max-width: 480px) {
  .app {
    padding-bottom: 95px;
  }
}


/* popups */
.hidden{
    display:none;
}

.overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    z-index:99;
}

.color-button{
    width:58px;
    height:58px;
    border:none;
    border-radius:14px;
    background:#2196f3;
    color:white;
    font-size:28px;
    cursor:pointer;
}

.picker{
    position:absolute;
    width:430px;
    background:#171717;
    color:white;
    border-radius:18px;
    box-shadow:0 18px 45px rgba(0,0,0,.55);
    border:1px solid #2b2b2b;
    padding:22px;
    z-index:100;
}

.picker::before{
    content:"";
    position:absolute;
    top:-10px;
    right:28px;

    width:18px;
    height:18px;

    background:#171717;

    transform:rotate(45deg);

    border-left:1px solid #2b2b2b;
    border-top:1px solid #2b2b2b;
}

.picker-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:22px;
    font-size:26px;
    font-weight:bold;
}

.picker-header button{
    background:none;
    border:none;
    color:white;
    font-size:34px;
    cursor:pointer;
}

.colors{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:22px;
}

.color-option{
    display:flex;
    flex-direction:column;
    align-items:center;
    cursor:pointer;
    gap:8px;
    transition:.15s;
}

.color-option:hover{
    transform:scale(1.08);
}

.swatch{
    width:62px;
    height:62px;
    border-radius:50%;
    border:3px solid transparent;
}

.selected .swatch{
    border-color:#2196f3;
    box-shadow:0 0 0 4px rgba(33,150,243,.35);
}

.red{background:#f44336;}
.blue{background:#2196f3;}
.green{background:#4caf50;}
.yellow{background:#ffeb3b;}
.orange{background:#ff9800;}
.purple{background:#9c27b0;}
.pink{background:#e91e63;}
.cyan{background:#00bcd4;}
.brown{background:#795548;}
.gray{background:#9e9e9e;}

/* Phones */
@media (max-width: 768px){

    .picker{
        width:calc(100vw - 24px);
        max-width:420px;

        left:50% !important;
        transform:translateX(-50%);

        padding:18px;
        border-radius:16px;
    }

    .picker::before{
        display:none;
    }

    .picker-header{
        font-size:22px;
        margin-bottom:18px;
    }

    .picker-header button{
        font-size:30px;
    }

    .colors{
        grid-template-columns:repeat(4,1fr);
        gap:18px;
    }

    .swatch{
        width:56px;
        height:56px;
    }

    .color-option span{
        font-size:14px;
    }

}

/* Small phones */
@media (max-width: 480px){

    .picker{
        width:calc(100vw - 16px);
        padding:16px;
    }

    .colors{
        grid-template-columns:repeat(3,1fr);
        gap:16px;
    }

    .swatch{
        width:52px;
        height:52px;
    }

    .picker-header{
        font-size:20px;
    }

}

/* Very small phones */
@media (max-width: 360px){

    .colors{
        gap:12px;
    }

    .swatch{
        width:46px;
        height:46px;
    }

    .color-option span{
        font-size:12px;
    }

}

/* popup2 */
.percentage-content{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.percentage-content label{
    color:#ddd;
    font-size:15px;
}

.input-wrapper{
    display:flex;
    align-items:center;

    background:#222;
    border:2px solid #333;
    border-radius:12px;

    padding:0 16px;

    transition:.2s;
}

.input-wrapper:focus-within{
    border-color:#2196f3;
}

.input-wrapper input{

    flex:1;

    background:transparent;
    border:none;
    outline:none;

    color:white;

    font-size:22px;

    padding:16px 0;
}

.input-wrapper span{
    color:#aaa;
    font-size:22px;
}

.error-message{

    background:#4d1717;

    border-left:4px solid #ff5252;

    color:#ff9d9d;

    padding:12px 14px;

    border-radius:8px;

    font-size:14px;
}

.buttons{

    display:flex;

    justify-content:flex-end;

    gap:12px;

    margin-top:8px;
}

.primary-btn{

    background:#2196f3;

    color:white;

    border:none;

    padding:12px 22px;

    border-radius:10px;

    cursor:pointer;

    font-size:15px;
}

.primary-btn:hover{
    background:#1b82d6;
}

.secondary-btn{

    background:#2d2d2d;

    color:white;

    border:none;

    padding:12px 22px;

    border-radius:10px;

    cursor:pointer;

    font-size:15px;
}

.secondary-btn:hover{
    background:#3b3b3b;
}

.picker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

#colorPicker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

/* Center the popup */
#colorPicker{
    position:fixed !important;
    top:50% !important;
    left:50% !important;
    transform:translate(-50%, -50%) !important;
}

/* Hide the little arrow since it's centered */
#colorPicker::before{
    display:none;
}

/* login/register popup */
/* =========================== */
/* LOGIN / REGISTER POPUP */
/* =========================== */

.brainauth_overlay_bg{

    position:fixed;
    inset:0;

    background:rgba(0,0,0,.35);
    backdrop-filter:blur(8px);

    display:flex;
    justify-content:center;
    align-items:center;

    z-index:5000;

}

.brainauth_popup_container{

    position:fixed;

    top:50%;
    left:50%;

    transform:translate(-50%,-50%);

    width:430px;
    max-width:92vw;

    background:#ffffff;

    border-radius:18px;

    overflow:hidden;

    box-shadow:
        0 20px 60px rgba(0,0,0,.25);

    animation:brainauth_popup_animation .25s ease;

    z-index:5001;

}

@keyframes brainauth_popup_animation{

    from{

        transform:
            translate(-50%,-45%)
            scale(.96);

        opacity:0;

    }

    to{

        transform:
            translate(-50%,-50%)
            scale(1);

        opacity:1;

    }

}

.brainauth_popup_header{

    background:#288BD0;
    color:white;

    padding:28px;

    position:relative;

}

.brainauth_popup_header h2{

    font-size:28px;
    margin-bottom:8px;

}

.brainauth_popup_header p{

    opacity:.9;
    font-size:14px;

}

.brainauth_close_popup{

    position:absolute;

    top:16px;
    right:16px;

    width:38px;
    height:38px;

    border:none;
    border-radius:50%;

    background:rgba(255,255,255,.18);

    color:white;

    font-size:24px;

    cursor:pointer;

    transition:.2s;

}

.brainauth_close_popup:hover{

    background:rgba(255,255,255,.32);

}

.brainauth_tab_navigation{

    display:flex;

    background:#f4f7fb;

}

.brainauth_tab_button{

    flex:1;

    padding:18px;

    border:none;

    background:none;

    font-size:16px;
    font-weight:bold;

    cursor:pointer;

    transition:.25s;

    color:#666;

}

.brainauth_tab_active{

    background:white;

    color:#288BD0;

    border-bottom:3px solid #288BD0;

}

.brainauth_error_message_box{

    margin:22px;

    padding:14px;

    border-radius:10px;

    background:#ffe8e8;

    color:#c62828;

    border:1px solid #ffc8c8;

    font-size:14px;

}

#brainauth_login_form{

    display:flex;

    flex-direction:column;

    gap:16px;

    padding:0 22px 22px;

}

.brainauth_text_input{

    padding:15px;

    border:1px solid #d8d8d8;

    border-radius:12px;

    font-size:15px;

    outline:none;

    transition:.2s;

}

.brainauth_text_input:focus{

    border-color:#288BD0;

    box-shadow:0 0 0 4px rgba(40,139,208,.15);

}

.brainauth_submit_button{

    margin-top:10px;

    padding:15px;

    border:none;

    border-radius:12px;

    background:#288BD0;

    color:white;

    font-size:16px;
    font-weight:bold;

    cursor:pointer;

    transition:.25s;

}

.brainauth_submit_button:hover{

    background:#1f79b7;

}
/* end login/register popup */


/* Game controller icon */
.icon.gamepad::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 11px;
    left: 2px;
    top: 6px;
    background: #1f80f0;
    border-radius: 8px;
}

.icon.gamepad::after {
    content: "🎮";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* n back type popup */
.settings_multi_select_option{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:16px;
    background:#222;
    border-radius:12px;

    cursor:pointer;
    transition:.2s;
}

.settings_multi_select_option:hover{
    background:#2d2d2d;
}

.settings_multi_select_checkmark{
    opacity:0;
    color:#2196f3;
    font-size:22px;
    font-weight:bold;
}

.settings_multi_select_option_selected{
    border:2px solid #2196f3;
}

.settings_multi_select_option_selected
.settings_multi_select_checkmark{
    opacity:1;
}
/* end of n back type popup */