/* styles/auth_style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');


.auth-container {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8); /* Dark overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
}

/* -------------------------------------------------------
   New auth UI (sliding Sign In / Sign Up)
   Scoped to #authView so it won't affect the rest of the app.
-------------------------------------------------------- */

/* Match Settings overlay: dim + blur behind the auth modal */
#authView.auth-container{
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  padding: 20px;
}

#authView *{
  box-sizing: border-box;
}

#authView{
  font-family: 'Poppins', sans-serif;
}

#authView h1{
  font-weight: 700;
  margin: 0;
  font-size: 28px;
}

#authView p{
  font-size: 15px;
  font-weight: 300;
  line-height: 24px;
  letter-spacing: 0.5px;
  margin: 20px 0 30px;
}

#authView span{
  font-size: 13px;
  color: #666;
}

#authView a{
  color: #2863eb;
  font-size: 14px;
  text-decoration: none;
  margin: 15px 0;
  transition: color 0.3s ease;
}

#authView a:hover{
  color: #2863eb;
}

#authView button{
  border-radius: 25px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #2863eb 100%);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  padding: 14px 50px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#authView button:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

#authView button:active{
  transform: translateY(0);
}

#authView button:focus{
  outline: none;
}

#authView button.transparent-btn{
  background: transparent;
  border: 2px solid #FFFFFF;
  box-shadow: none;
}

#authView button.transparent-btn:hover{
  background: rgba(255, 255, 255, 0.1);
}

/* Close button (top-right) */
#authView .auth-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #111827;
  font-size: 26px;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  z-index: 250;
}

#authView .auth-close:hover{
  transform: translateY(-1px);
}

#authView form{
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 50px;
  height: 100%;
  text-align: center;
}

#authView input{
  background-color: #f3f4f6;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 8px 0;
  width: 100%;
  font-size: 14px;
  transition: all 0.3s ease;
}

#authView input:focus{
  outline: none;
  border-color: #667eea;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#authView .auth-wrapper{
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  width: 850px;
  max-width: 100%;
  min-height: 550px;
}

#authView .auth-form-box{
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
}

#authView .login-form-box{
  left: 0;
  width: 50%;
  z-index: 2;
}

#authView .auth-wrapper.panel-active .login-form-box{
  transform: translateX(100%);
}

#authView .register-form-box{
  left: 0;
  width: 50%;
  opacity: 0;
  z-index: 1;
}

#authView .auth-wrapper.panel-active .register-form-box{
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: authShow 0.6s;
}

@keyframes authShow{
  0%,49.99%{ opacity: 0; z-index: 1; }
  50%,100%{ opacity: 1; z-index: 5; }
}

#authView .slide-panel-wrapper{
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 100;
}

#authView .auth-wrapper.panel-active .slide-panel-wrapper{
  transform: translateX(-100%);
}

#authView .slide-panel{
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

#authView .auth-wrapper.panel-active .slide-panel{
  transform: translateX(50%);
}

#authView .panel-content{
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 50px;
  text-align: center;
  top: 0;
  height: 100%;
  width: 50%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

#authView .panel-content-left{
  transform: translateX(-20%);
}

#authView .auth-wrapper.panel-active .panel-content-left{
  transform: translateX(0);
}

#authView .panel-content-right{
  right: 0;
  transform: translateX(0);
}

#authView .auth-wrapper.panel-active .panel-content-right{
  transform: translateX(20%);
}

#authView .social-links{
  margin: 25px 0;
}

#authView .social-links a{
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 8px;
  height: 45px;
  width: 45px;
  transition: all 0.3s ease;
  color: #667eea;
}

#authView .social-links a:hover{
  border-color: #667eea;
  background: #667eea;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#authView .mobile-switch{
  display: none;
}

#authView .auth-wrapper.registration-disabled .register-form-box form,
#authView .auth-wrapper.registration-disabled .panel-content-right{
  filter: grayscale(1);
  opacity: 0.58;
}

#authView .auth-wrapper.registration-disabled #form-register input{
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

#authView .auth-wrapper.registration-disabled #form-register .social-links a{
  pointer-events: none;
  opacity: 0.55;
}

#authView .auth-wrapper.registration-disabled #registerBtn,
#authView .auth-wrapper.registration-disabled #mobileRegisterBtn,
#authView .auth-wrapper.registration-disabled #form-register button[type="submit"]{
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
  transform: none !important;
  pointer-events: none;
}

/* Error message blocks under each form */
#authView .auth-message{
  margin-top: 14px;
  font-size: 13px;
  color: #e11d48;
  min-height: 1.2em;
}

/* Responsive Design */
@media (max-width: 768px){
  #authView{
    padding: 10px;
  }

  #authView .auth-wrapper{
    min-height: auto;
    width: 100%;
    max-width: 100%;
    border-radius: 15px;
  }

  #authView .auth-form-box{
    position: static !important;
    width: 100% !important;
    transform: none !important;
    opacity: 1 !important;
  }

  #authView .login-form-box,
  #authView .register-form-box{
    position: static !important;
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    z-index: 1 !important;
  }

  #authView .register-form-box{
    display: none;
  }

  #authView .auth-wrapper.panel-active .login-form-box{
    display: none;
  }

  #authView .auth-wrapper.panel-active .register-form-box{
    display: block;
  }

  #authView .slide-panel-wrapper{
    display: none !important;
  }

  #authView form{
    padding: 30px 25px;
    position: static;
    height: auto;
  }

  #authView h1{
    font-size: 22px;
    margin-bottom: 10px;
  }

  #authView input{
    padding: 12px 15px;
    font-size: 14px;
  }

  #authView button{
    padding: 12px 40px;
    font-size: 12px;
  }

  #authView .social-links a{
    height: 40px;
    width: 40px;
    margin: 0 5px;
  }

  #authView .mobile-switch{
    display: block;
    margin-top: 20px;
    color: #667eea;
    font-size: 14px;
  }

  #authView .mobile-switch p{
    margin: 10px 0;
    font-size: 14px;
  }

  #authView .mobile-switch button{
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 30px;
    margin-top: 10px;
    box-shadow: none;
  }

  #authView .mobile-switch button:hover{
    background: #667eea;
    color: #fff;
  }
}


.auth-card {
  background: var(--card-bg);
  width: 100%;
  max-width: 360px;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  text-align: center;
  border: 1px solid var(--border-subtle);
}

.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form input {
  padding: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
}

.auth-btn {
  width: 100%;
  padding: 0.9rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary { background: var(--muted-strong); }

.text-btn {
  margin-top: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
}

.auth-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #e11d48; /* Red for errors */
  min-height: 1.2em;
}

/* -------------------------------------------------------
   Account modal (reuses .auth-container overlay)
-------------------------------------------------------- */

.account-card{
  background: var(--card-bg);
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  border: 1px solid var(--border-subtle);
}

.account-title{
  margin: 0 0 1.2rem 0;
  text-align: center;
}

.account-row{
  display:flex;
  align-items:baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.account-label{
  color: var(--muted);
  font-size: 0.92rem;
}

.account-value{
  color: var(--fg);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.account-bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.12);
  overflow: hidden;
  margin-top: 6px;
}

.account-bar-fill{
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 180ms ease;
}

.account-message{
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 1.2em;
  text-align: center;
}

.account-actions{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

/* -------------------------------------------------------
   Profile picture UI (Account modal + picker)
-------------------------------------------------------- */

.account-avatar-block{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  margin: 0 0 14px 0;
}

.account-avatar{
  width:78px;
  height:78px;
  border-radius:999px;
  border:1px solid var(--border-subtle);
  background: var(--bg);
  padding:0;
  cursor:pointer;
  display:grid;
  place-items:center;
  overflow:hidden;
}

.account-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.account-avatar svg{
  width:34px;
  height:34px;
  fill:none;
  stroke: var(--muted-strong);
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.account-avatar-hint{
  color: var(--muted);
  font-size:.86rem;
  text-align:center;
}

/* Picker modal */
.avatar-picker-card{
  background: var(--card-bg);
  width: min(860px, calc(100vw - 2rem));
  height: min(620px, calc(100vh - 2rem));
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.avatar-picker-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding: 16px 16px 12px;
  border-bottom:1px solid var(--border-subtle);
}

.avatar-picker-title{ margin:0; font-size:1.05rem; }
.avatar-picker-sub{ margin-top:4px; color: var(--muted); font-size:.9rem; }

.avatar-picker-grid{
  padding: 16px;
  overflow:auto;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.avatar-tile{
  border:1px solid var(--border-subtle);
  background: var(--bg);
  border-radius: 14px;
  padding: 10px;
  display:flex;
  flex-direction:column;
  gap: 8px;
  cursor:pointer;
  text-align:left;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.avatar-tile:hover{
  border-color: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}

.avatar-thumb{
  width:100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow:hidden;
  background: rgba(0,0,0,.06);
}

body.theme-dark .avatar-thumb{
  background: rgba(255,255,255,.08);
}

.avatar-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.avatar-name{
  font-size:.85rem;
  font-weight:700;
  color: var(--fg);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-picker-actions{
  padding: 12px 16px;
  border-top:1px solid var(--border-subtle);
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
