@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');
*{
    margin : 0;
    padding : 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color : var(--white);
}
:root{
    --hue : 360;
    --primary : hsl(var(--hue) , 50% ,50%);
    --white : #ffffff;
    --black : #3d3d3d;
}
body{
    width : 100%;
    min-height : 100vh;
    background: linear-gradient(180deg , #000000 , #e74c3c);
    display: flex;
    flex-direction: column;
}
a{
    text-decoration: none;
    color : var(--white);
}
ul li{
    list-style: none;
}
.container{
    max-width: 1200px;
    margin : 0 auto;
    padding: 0 20px; /* Add some padding for smaller screens */
}
span{
    color : var(--primary);
}

/* --- ENHANCED GLASS NAVBAR --- */
.navbar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px; /* Adjusted padding */
    margin-top: 20px;
    width : 100%;
    
    /* Glassmorphism Effect */
    background: rgba(231, 76, 60, 0.15); /* Reddish transparent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 7px 8px 15px rgba(233, 71, 71, 0.805);
}

.nav-items{
    display: flex;
    gap : 2rem;
    font-size: 16px; /* Slightly larger font */
    font-weight: 400;
    align-items: center;
    text-transform: capitalize;
}
.nav-items a {
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.nav-items a:hover{
    background-color: rgba(255, 255, 255, 0.1); /* Subtle hover for links */
}
::placeholder{
    color : var(--black);
}

/* --- Other page styles (unchanged) --- */
.register-page{
    width : 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.register-page .box1 , .register-page .box2{
    width : 45%;
    height : 100%;
}
.register-page .box1 img{
    object-fit: contain;
    width : 100%;
    height : 100%;
}
.register-page form{
    width : 100%;
}
.register-page .field{
    width : 90%;
    margin :25px 0;
    display: flex;
    flex-direction: column;
}
label{
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: capitalize;
    font-weight: 400;
    font-size: 14px;
}
input{
    border: 4px solid transparent;
    outline: none;
    border-radius: 5px;
    letter-spacing: 1px;
    padding:7.3px;
    font-weight: 300;
    color : var(--black);
    transition: all 0.3s ease;
}
input:focus {
    border: 4px solid #e74c3c;
    box-shadow: 0 0 60px hsla(var(--hue), 50%, 50%, 0.7);
}
.register-page .box1{
    height : 34rem;
}

.login-box{
    border-radius: 15px;
    width : 75%;
    margin-top: 2rem;
    margin-left: 12.5rem;
    height : 32rem;
    position : relative;
    display: flex;
    align-items: center;
    justify-content: center;
    
    background: rgba(231, 76, 60, 0.1);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}
.login-page{
    width : 50%;
}
.login-page .field{
    width : 100%;
    margin :25px 0;
    display: flex;
    flex-direction: column;
}
.login-box .img-box{
    position : absolute;
    top : 0;
    left : 0;
    display: block;
    width : 100%;
    height : 100%;
    z-index : -1;
    opacity : .08;
}
.login-box .img-box img{
    width : 100%;
    height : 90%;
    object-fit: contain;
    object-position: center;
}

.main-page{
    width : 100%;
    height : 75vh;
    display : flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.main-page p{
    font-weight: 300;
    font-size : 14px;
    text-transform: capitalize;
}
.main-page h1{
    align-items: center;
    justify-content: space-around;
    font-size : 84px;
    text-transform: capitalize;
    letter-spacing: 1px;
}
.lock{
    animation: animate 1s ease-in-out 0s infinite alternate forwards;
    display: inline-block;
}
@keyframes animate{
    0%{ transform: scale(.8); }
    100%{ transform: scale(1); }
}

.footer{
    margin-top: auto;
    padding : 32px 0;
}
.footer p{
    font-size : 14px;
    text-align: center;
    font-weight : 300;
    letter-spacing: 1px;
}

/* --- UPDATED REDDISH GLASS BUTTON STYLES --- */

.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    margin-top: 0.7rem;
    width: 100%;
    
    background: rgba(231, 76, 60, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-register{
    margin-left: -27px;
}

.main-page .btn-modern {
    width: auto;
}

.btn-modern:hover {
    background: rgba(231, 76, 60, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.6);
    transform: translateY(-3px);
}

.btn-modern i {
    color: var(--white);
}

/* ✨ THIS IS THE FIX ✨ */
.btn-modern span {
    color: var(--white); /* This makes the button text white */
}

.logout a {
    padding: 8px 15px;
    font-weight: 500;
    background: rgba(231, 76, 60, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}
.logout a:hover {
    background: rgba(231, 76, 60, 0.6);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

/* --- GITHUB ICON STYLES --- */

/* Make the footer a positioning container */
.footer.container {
    position: relative;
    text-align: center; /* Keep the text centered */
}

body.index-page .github-icon {
    position: absolute;
    bottom: 15px; /* Your requested position from the bottom */
    right: -100px;  /* Adjusted position to be visible on screen */
    font-size: 2.9rem; /* Your requested icon size */
    color: var(--white);
    transition: all 0.3s ease; /* Smooth hover transition */
}

body.index-page .github-icon:hover {
    color: var(--primary); /* Change color to red on hover */
    transform: scale(1.1) translateY(-5px); /* Make it slightly larger and lift it */
    text-shadow: 0 0 15px var(--primary); /* This line adds the glow effect */
}

/*------------New Css for New UI and btns-------------*/

/* 🔥 Fix Scroll by hiding overflow caused by floating circles */
body {
    position: relative;
    overflow-x: hidden;
    overflow-y: hidden; /* prevents vertical scroll */
}

/* 🔥 Background Circles as elements */
.circle1,
.circle2 {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
    z-index: -1;
}

.circle1 {
    width: 360px;
    height: 360px;
    top: 11%;
    left: -150px;
    animation: floatCircle 5s infinite ease-in-out;
}

.circle2 {
    width: 270px;
    height: 270px;
    bottom: 12%;
    right: -100px;
    animation: floatCircle 7s infinite ease-in-out;
}

@keyframes floatCircle {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}


/* 🔥 Bold Subtext */
.sub-text {
    font-size: 20px !important;
    font-weight: 550 !important;
    margin-bottom: 10px;
    z-index: 1;
    text-align: center;
    text-shadow: 15px 17px 25px rgba(0,0,0,0.4);
}

.sub-text i {
    color: #e74c3c;
    font-size: 20px;
    margin-right: 10px; 
    transition: transform 0.3s ease, color 0.3s ease; 
}

/* 🔥 Bold Description */
.description {
    text-align: center;
    width: 70%;
    margin: 1rem auto;
    font-weight: 600 !important;
    font-size: 14px;
    line-height: 28px;
    z-index: 1;
    text-shadow: 15px 17px 25px rgba(0,0,0,0.4);
}

/* 🔥 Lift-up effect on heading */
.jwt-heading {
    font-size: 84px;
    letter-spacing: 1px;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    text-align: center;
    text-shadow: 15px 17px 25px rgba(0,0,0,0.4);
}

.jwt-heading:hover {
    transform: translateY(-8px);
    text-shadow: 4px 5px 20px rgba(0,0,0,0.4);
}


/* Extra bold for about page text except name */
.about-page p,
.about-page span {
    font-weight: 600 !important; /* extra bold */
    font-family: Arial, sans-serif; /* ensure font supports heavy weight */
}

/* Transparent background image for index page */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/background.png') no-repeat center center/cover;
    opacity: 0.28; /* adjust transparency */
    z-index: -2; /* sits behind bubbles */
}

/*---------New UI for description-box---------*/
.description-box {
    width: 60%; /* keeps it readable without being too wide */
    margin: 1rem auto;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05); /* subtle glass effect */
    backdrop-filter: blur(-3px);
    border-radius: 15px;
    text-align: left;
    box-shadow: 9px 13px 20px rgba(0,0,0,0.15);
}

.description-list {
    list-style: none;
    padding-left: 0;
    font-size: 14px;
    line-height: 1.8; /* spacing for readability */
    color: #ffffff;
}

.description-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px; /* space between icon and text */
    transition: transform 0.3s ease, color 0.3s ease;
}

.description-list li i {
    color: #e74c3c; /* a modern, subtle accent color */
    margin-top: 3px;
    flex-shrink: 0;
}

.description-list li:hover {
    transform: translateX(5px);
    color: #e74c3c; /* changes text color on hover for interactivity */
}

/*---------New UI for About section---------*/
.about-page {
    width: 80%;
    margin: 3.5rem auto;
    text-align: left;
}

.about-page .intro {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 1.2rem;
    text-align: center;
}

.about-page .intro i {
    color: #e74c3c;
    font-size: 20px;
    transition: transform 0.3s ease, color 0.3s ease;
    margin-right: 4px;
}

.about-page .user-name {
    font-size: 60px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    
}

.about-info {
    list-style: none;
    padding: 0;
    line-height: 2.2;
    font-size: 20px;
    font-weight: 500;
}

.about-info li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.about-info li i {
    color: #e74c3c;
    font-size: 24px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.about-info li:hover i {
    transform: scale(1.2) rotate(10deg);
    color: #ff4757;
}

.about-info li:hover {
    transform: translateX(5px);
}

/*---------New styling for jwt button---------*/
.jwt-usage {
    margin-top: 0.8rem;
    text-align: center;
    color: var(--white);
}

.jwt-button {
    background: rgba(255, 255, 255, 0.05); /* glass effect */
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 7px;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(10px);
    box-shadow: 7px 8px 15px rgba(233, 71, 71, 0.64);
    transition: all 0.3s ease;
    margin: 0 auto 3.5rem;
    margin-bottom: 2.2rem;
    display: block;
}

.jwt-button i {
    font-size: 15px;
    color: #e74c3c;
    transition: transform 0.3s ease, color 0.3s ease;
}

.jwt-icons {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.icon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.icon-box i {
    font-size: 30px;
    color: #e74c3c;
    margin-bottom: 0.5rem;
    animation: float 2s infinite alternate ease-in-out;
}

.icon-box p {
    font-size: 16px;
    font-weight: 500;
}

/* Hover effect */
.icon-box:hover i {
    transform: scale(1.3) rotate(10deg);
    color: #ff4757;
}

.icon-box:hover {
    transform: translateY(-5px);
}

/* Floating animation */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* === Desktop / Default === */
.success-message {
  color: #2ecc71;             /* green text */
  text-align: center;
  margin-bottom: 20px;
  font-size: 18px;
}

.error-msg{
  color: #e74c3c; 
  text-align: center; 
  margin-bottom: 15px;
}

.success-msg{
  color: #2ecc71; 
  text-align: center; 
  margin-bottom: 15px;
}

/* ✅ Mobile & Tablet screens for index(home) screen (≤768px) */
@media (max-width: 768px) {

   /* Prevent horizontal scroll & fix background */
    html, body {
        max-width: 100% !important;
        overflow-x: hidden !important;
        position: relative;
        background-attachment: scroll; /* Change from 'fixed' to 'scroll' */
    }

   /* Transparent background image for index page */
  body::after {
    content: "";
    position: absolute; /* ✨ Change fixed to absolute here ✨ */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/background.png') no-repeat center center/cover;
    opacity: 0.28;
    z-index: -2;
  }

  /* Reset default margins/padding */
  body, h1, h2, h3, h4, h5, h6, p, div, section {
    margin: 0;
    padding: 0;
  }

  .success-message {
  position: absolute;
  top: 120px; /* adjust based on your layout */
  left: 52%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #2ecc71;
  padding: 6px 12px;
  border-radius: 5px;
  white-space: nowrap;
}

 .error-msg {
  position: absolute;
  top: -50px; /* adjust based on your layout */
  left: 51%;
  transform: translateX(-50%);
  font-size: 10.8px;
  color: #e74c3c;
  padding: 6px 12px;
  border-radius: 5px;
  white-space: nowrap;
  font-weight: 500;
}

.success-msg{
   position: absolute;
  top: -50px; /* adjust based on your layout */
  left: 51%;
  transform: translateX(-50%);
  font-size: 10.8px;
  color: #2ecc71;
  padding: 6px 12px;
  border-radius: 5px;
  white-space: nowrap;
  font-weight: 500;
}

  /* Containers */
  .main-page, .container {
    margin: 0;
    padding: 0;
  }

  /* Navbar */
  .navbar {
    width: 95%;               
    margin: 8px auto;         
    flex-direction: column;   
    align-items: center;
    padding: 12px 16px;       /* increased padding */
  }

  .nav-items {
    display: flex;
    flex-wrap: wrap;          
    justify-content: center;  
    gap: 6px 0;              
    width: 100%;
    margin-top: 6px;
  }

  .nav-items a {
    flex: 0 0 45%;            
    text-align: center;
    font-size: 14px;
    padding: 8px;
  }

  /* JWT heading */
  .jwt-heading {
    font-size: 28px !important;
    line-height: 1.1;        
    margin: 23px;         
    text-align: center;
    max-width: 90%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Sub-text */
  .sub-text {
    font-size: 13px !important;
    line-height: 1.2;         
    margin: 2px auto 4px;     
    text-align: center;
    padding: 0 8px;
    margin-top: -40px;
  }

  /* Description */
  .description, .description-box {
    width: 90%;
    font-size: 13px;
    line-height: 18px;        
    margin: 4px auto;    
    margin-bottom: 25px;    
    text-align: left;         
    padding: 6px 10px;        
    box-sizing: border-box;
  }

  /* Icon group inside description box */
.description-box .icon-box {
  margin-top: 70px;  /* adjust as needed */
}

  /* Buttons */
  .btn-modern,
  .jwt-button {
    width: 90%;       
    font-size: 14px;
    padding: 6px 10px;
    margin: 4px auto;         
    display: block;
    text-align: center;
  }

  /* Icons section */
  .jwt-icons {
    flex-direction: column;
    gap: 4px;                
    margin: 4px auto;
  }

  .icon-box i {
    font-size: 20px;
  }

  .icon-box p {
    font-size: 13px;
    margin: 2px 0;     
    margin-bottom: 30px;       
  }

  /* Footer & GitHub Icon */
  .footer {
    padding: -30px 0;
    margin: 4px auto;
    text-align: center;
  }

  .footer p {
    font-size: 12.2px;
    margin: -80px 0;
  }

  body.index-page .github-icon {
    position: relative;
    bottom: auto;
    right: auto;
    display: block;
    margin: 79px auto 0;     
    font-size: 1.5rem;
    text-align: center;
  }

  /* Hide background circles */
  .circle1,
  .circle2 {
    display: none; /* hidden on mobile/tablet */
  }
}


/* --- LOGIN PAGE STYLES (MOBILE) --- */
@media (max-width: 768px) {

  .login-box {
    width: 90%;
    margin-top: 12vh; /* Adjust this value to move the box down */
    margin-left: auto; /* Center the box */
    margin-right: auto;
    margin-bottom: 26vh; 
    height: auto;
    padding: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 10px;
  }

  .login-page {
    /* Make the content take up the full width of its container */
    width: 100%;
    padding: 0 10px; /* Add some padding inside the form for spacing */
  }

  .login-page .field {
    /* Ensure fields are full width and have proper spacing */
    width: 100%;
    margin: 15px 0;
  }

  .login-box .img-box {
    /* Hide the background image on mobile for a cleaner look */
    display: none;
  }

  .btn-modern {
    /* Make the login button full width and centered */
    width: 100%;
    margin-top: 30px;
  }
  
}

.error-message {
    font-size: 14px;
    color: #FFEB3B;
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    left: -26px;
    top: 18px;
}


/* ✅ Mobile & Tablet screens for register section (≤768px) */
@media (max-width: 768px) {

  /* --- Register Page --- */
  .register-page {
    /* Stack elements vertically */
    flex-direction: column; 
    /* Center the stacked elements */
    align-items: center; 
    /* Add some top margin to push it down from the navbar */
    margin-top: 12px; 
    padding: 0 15px; /* Add horizontal padding for a clean look */
  }

  .error-message {
    width: 90%; /* Adjust the width to fit mobile screens */
    margin-left: 44px;
    font-size: 12.3px;
    margin-top: -32px;
    margin-bottom: 30px;
  }

  .register-page .box1,
  .register-page .box2 {
    /* Make both boxes take full width on mobile */
    width: 100%; 
  }

  .register-page .box1 {
    /* Hide the large image on mobile for better performance and usability */
    display: none; 
  }

  .register-page .box2 {
    /* Add padding to the form container */
    padding: 20px; 
  }

  .register-page form {
    /* Ensure the form takes full width */
    width: 100%; 
  }

  .register-page .field {
    /* Adjust width to fit the mobile container */
    width: 100%; 
    margin: 15px 0; /* Adjust vertical spacing */
  }

  .btn-register {
    /* Adjust the button margin to align correctly */
    margin-left: 0; 
    margin-top: 30px;
  }
}

/* ✅ Mobile & Tablet screens (≤768px) */
@media (max-width: 768px) {

  /* --- About Page Fixes --- */
  .about-page {
    width: 95%;
    margin: 20px auto;
    padding: 0 10px;
    text-align: center;           /* keep text centered */
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .about-page .intro {
    font-size: 12.7px;              /* smaller & readable */
    margin-top: 180px;
    text-align: center;           /* center on mobile */
    word-break: break-word;
    line-height: 1;
    padding: 0 8px;               /* prevent cutoff */
  }

  .about-page .user-name {
    font-size: 27px;              /* reduced for mobile */
    margin-bottom: 0;
    margin-top: -8px;
    text-align: center;
    word-break: break-word;
  }

  /* --- About Info (Email, Phone, Encrypted, Password) --- */
  .about-info {
    width: 100%;
    padding: 0;
    margin: 0;
    text-align: left;
  }

  .about-info li {
    display: block;
    margin-bottom: 0.9rem;
    font-size: 13.8px;
    line-height: 1.4;
    word-break: break-all;
    text-align: left;
  }

  .about-info li i {
    display: inline-block;
    margin-right: 6px;
  }
  
  /* --- JWT Usage Section --- */
  .jwt-usage {
    margin-top: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
  }
  
  .jwt-button {
    width: 70%;
    margin: 2rem auto;
    padding: 7px 11px;
    font-size: 13px;
  }

  /* --- JWT Icons --- */
  .jwt-icons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 8px;
    margin: 1rem auto 3rem auto;
    width: 95%;
  }

  .icon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 15%;                   /* 2 per row instead of 4 squished */
    text-align: center;
    margin-bottom: 70px;
  }
  
  .icon-box i {
    font-size: 22px;
    margin-bottom: 5px;
  }

  .icon-box p {
    font-size: 11px;
    line-height: 1.2;
    word-break: break-word;
  }
}

/*----Eye icon in password-------*/
.password-field {
    position: relative;
}

.password-field .toggle-password {
    position: absolute;
    right: 10px;
    top: 73.5%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
}



