@import url('https://fonts.googleapis.com/css2?family=BBH+Sans+Bartle&family=BBH+Sans+Bogle&family=BBH+Sans+Hegarty&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Outfit:wght@100..900&family=Rethink+Sans:ital,wght@0,400..800;1,400..800&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Stack+Sans+Text:wght@200..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=BBH+Bartle&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Outfit:wght@100..900&family=Rethink+Sans:ital,wght@0,400..800;1,400..800&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Stack+Sans+Text:wght@200..700&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Rethink Sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    background: #010101;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Header with logo */
.header {
    position: relative;
    z-index: 15;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.logo img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo svg {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 400;
    font-style: normal;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Background logo watermark */
.logo-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    opacity: 0.03;
    z-index: 1;
    pointer-events: none;
}

.logo-watermark svg {
    width: 100%;
    height: 100%;
}


/* Main container */
.container {
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 1400px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
    
}

/* Left side - Welcome content */
.welcome-side {
    margin: 5rem 0;
}

.welcome-title {
    
    font-size: 3rem;
    color: #fff;
    margin-bottom: .5rem;
    line-height: 1.2;
    font-weight: 600;
}

.welcome-subtitle {
    color: #0ae6f9;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.welcome-description {
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

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

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #0ae6f9;
}

.feature-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #0e0e12;
    color: #51C5C8;
    font-size: 1.2rem;
    box-shadow:
        inset 4px 0 8px -2px #51C5C8,
        inset 0 0 6px 1px rgba(81, 197, 200, 0.6);
}

/* Right side - Auth forms */
.auth-side {
    background: #010101;
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    transition: all 0.4s ease;
    max-width: 500px;
    margin-left: 5rem;
}

.auth-side:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 10px rgba(0, 255, 200, 0.162);
}

/* Small logo in auth form */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-logo-circle {
    width: 120px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-logo-circle img {
    width: 130px;
    height: 48px;
}

.auth-logo svg {
    width: 32px;
    height: 32px;
}

.auth-logo-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 400;
}

/* Form toggle */
.form-toggle {
    display: flex;
    background: #010101;
    border-radius: 10px;
    padding: 0.3rem;
    margin-bottom: 2rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.8rem;
    margin: .1rem;
    background: none;
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    font-family: "Rethink Sans", sans-serif;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #0ae6f9;
    border: 1px solid #0ae5f965;
    box-shadow: inset 4px 0 8px -2px #0ae5f965, inset 0 0 6px 1px rgba(10, 229, 249, 0.31);

}

.auth-form {
    display: none;
    font-family: "Rethink Sans", sans-serif;
    font-weight: 400;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    color: #fff;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    transition: all 0.3s;
    font-weight: 400;
    font-family: "Rethink Sans", sans-serif;
}

.form-group input:focus {
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.678);
    /* box-shadow: 0 0 20px rgba(6, 214, 160, 0.3); */
    font-family: "Rethink Sans", sans-serif;
    font-weight: 400;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
     font-family: "Rethink Sans", sans-serif;
    font-weight: 400;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 58%;
    transform: translateY(-10%);
    cursor: pointer;
    color: #aaa;
    font-size: 15px;
    transition: all 0.3s;
}

.password-toggle:hover {
    transform: translateY(-10%) scale(1.15);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(90deg, #0a0f12, #0f5f66);
    box-shadow: -20px 0 40px rgba(0,0,0,0.6);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1rem;
    font-family: "Rethink Sans", sans-serif;
    font-weight: 400;
}

.submit-btn:hover {
    transform: translateY(-3px);
}

.web3-connect {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap; /* ensures buttons wrap on smaller screens */
}

.web3-btn {
    flex: 1 1 150px; /* makes buttons grow and shrink, with a min width */
    padding: 0.8rem 1rem;
    background-color: #010101;
    border: 1px solid rgba(81, 196, 200, 0.2);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease; /* smooth hover transition */
    font-weight: 500;
    text-align: center;
}

.web3-btn:hover {
    color: #0ae6f9;
    border-color: rgba(10, 229, 249, 0.29);
    box-shadow: inset 4px 0 8px -2px rgba(10, 229, 249, 0.4), 
                inset 0 0 6px 1px rgba(10, 229, 249, 0.3);
    background-color: #111; /* subtle darken on hover */
}

.web3-btn i {
    display: inline-flex;
    font-size: 1.2rem;
}

/* Optional: mobile-friendly adjustments */


.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #ccc;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider span {
    padding: 0 1rem;
}

.forgot-link {
    color: #0ae6f9;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Loading animation */
.loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}
/* ------------------------------- */
/* Language switcher */
.lang-form {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}
.lang-dropdown {
  position: relative;
  display: inline-block;
}

/* MAIN FLAG BUTTON */
.lang-btn {
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: none;
  width: 100px;
  height: 45px;
  line-height: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: stretch;
  justify-content: stretch;
}

.lang-btn {
  background-color: #010101;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}


.lang-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* DROPDOWN */
.lang-menu {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  background: #010101;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  width: 120px;
  height: 45px;
  z-index: 1000;
  border-radius: 0.75rem;
}

.lang-menu div {
  padding: 8px 12px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

/* DROPDOWN FLAGS */
.lang-menu img {
  width: 38px;   /* 🔧 dropdown flag size */
  height: 32px;
}

.show {
  display: block;
}
.lang-btn {
  min-width: 120px; /* 🔥 fixed width */
  height: 45px;     /* 🔥 fixed height */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 0.75rem;
}

.lang-btn span {
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.lang-btn img {
  width: 30px;
  height: 20px;
}




/* =========================
   RTL SUPPORT (Arabic)
   ========================= */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    
}

html[dir="rtl"] .auth-container {
    direction: rtl;
}

html[dir="rtl"] .auth-side {
    margin-left: 0;
    margin-right: 5rem;
}

/* Header & logo */
html[dir="rtl"] .header,
html[dir="rtl"] .logo-container {
    flex-direction: row-reverse;
}

/* Features list */
html[dir="rtl"] .feature {
    flex-direction: row-reverse;
    text-align: right;
}

/* Form labels & inputs */
html[dir="rtl"] .form-group label {
    text-align: right;
}

/* Input padding & icons */
html[dir="rtl"] .form-group input {
    padding: 1rem 1rem 1rem 3rem;
}

html[dir="rtl"] .password-toggle {
    right: auto;
    left: 1rem;
}

/* Forgot password link */
html[dir="rtl"] .forgot-link {
    text-align: right;
    display: block;
}

/* Form toggle buttons */
html[dir="rtl"] .form-toggle {
    flex-direction: row-reverse;
}

/* Web3 buttons */
html[dir="rtl"] .web3-btn {
    flex-direction: row-reverse;
}

/* Language switcher position */
html[dir="rtl"] .lang-form {
    right: auto;
    left: 20px;
}
html[dir="rtl"] .toggle-btn{
    font-weight: 400;
}

html[dir="rtl"] .lang-menu {
    right: auto;
    left: 0;
}
html[dir="rtl"] .welcome-side {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .welcome-title {
    margin-bottom: 2rem;
}
html[dir="rtl"] .welcome-subtitle{
    margin-bottom: .6rem;
}
/* Titles & text */
html[dir="rtl"] .welcome-title,
html[dir="rtl"] .welcome-subtitle,
html[dir="rtl"] .welcome-description {
    text-align: right;
}

/* ===============================
   FEATURES: TEXT THEN ICON (RTL)
   =============================== */

html[dir="rtl"] .features {
    direction: rtl;
}

html[dir="rtl"] .features .feature {
    flex-direction: row-reverse; /* text first, icon last */
    text-align: right;
}

html[dir="rtl"] .features .feature-icon {
    margin-right: 0;
    margin-left: 0.75rem;
}

html[dir="rtl"] .features .feature span {
    text-align: right;
}
/* ===============================
   FEATURES — ARABIC STYLE
   =============================== */

html[dir="rtl"] .features .feature {
    flex-direction: row; /* text first, icon last */
    justify-content: flex-start;
    text-align: right;
}

html[dir="rtl"] .features .feature span {
    font-size: 1.1rem;
    color: #0ae6f9;
}

html[dir="rtl"] .features .feature-icon {
    margin-left: 0;
    margin-right: 0.75rem; /* space before icon */
}





/* Mobile fix */
@media (max-width: 768px) {
    html[dir="rtl"] .welcome-side {
        text-align: center;
    }

    html[dir="rtl"] .feature {
        justify-content: center;
    }
}


/* Mobile fix */
@media (max-width: 1024px) {
    html[dir="rtl"] .auth-side {
        margin-right: 0;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
    .auth-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .auth-side {
        margin-left: 0;
        width: 100%;
        max-width: 450px;
        padding: 2rem 1.5rem;
    }

    .welcome-side {
        text-align: center;
        padding: 1rem 0;
    }
}

@media (max-width: 768px) {

  /* Hide left welcome section */
  .welcome-side {
    display: none !important;
  }

  /* Auth container becomes single column */
  .auth-container {
    grid-template-columns: 1fr;
    justify-content: center;
    align-items: center;
  }

  /* Auth card full focus */
  .auth-side {
    max-width: 100%;
    margin: 0 auto;
  }
  
  
}

@media (max-width: 768px) {
    .lang-form,
    html[dir="rtl"] .lang-form {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        margin-top: 1rem;
        margin-bottom: 0rem;      
        z-index: auto;
        text-align: center;         
        display: flex;
        justify-content: center;
    }

    .auth-side {
        margin-top: 0;            
    }

    .lang-menu,
    html[dir="rtl"] .lang-menu {
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }
}


@media (max-width: 480px) {
    .auth-side {
        width: 100%;
        padding: 1rem;
        border-radius: 12px;
        
    }

    .form-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .toggle-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .form-group input {
        padding: 0.8rem 2.5rem 0.8rem 0.8rem;
    }

    .password-toggle {
        font-size: 18px;
        right: 0.8rem;
    }
    
}

