/* Importing Google Font */
@import url('https://fonts.googleapis.com/css?family=Inter:100,200,300,regular,500,600,700,800,900');

/* Custom scrollbar style to hide it */
::-webkit-scrollbar {
    width: 0;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Ensure the app logo is positioned relative to its parent */
}

.app-logo {
    position: absolute; /* Make the logo float */
    top: -40px; /* Adjust as necessary */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    width: 90px; /* Adjust initial size */
    height: 90px;
    z-index: 1000; /* Ensure it appears above other elements */
}


/* General Reset and Box Model */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    min-height: 100vh; /* Ensures the body takes at least full height of viewport */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2e2e2e;
    font-family: 'Inter', sans-serif;
    background-color: #fff;
}

/* Main Wrapper Styles */
.wrapper {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden; /* Prevents overflow of content */
    padding: 30px 0;
    display: flex;
}

@media (min-width: 768px) {
    /* Responsive styles for larger screens */
    .wrapper {
        height: 50rem;
        width: 25rem;
        border-radius: 40px;
        border: 10px solid #2e2e2e;
    }
}

/* Screen Styling (Different views inside wrapper) */
.wrapper .screen {
    min-width: 100%;
    flex: 1;
    transition: transform 0.6s cubic-bezier(0.42, 0, 0.58, 1); /* Smooth transition for screens */
}

/* Enhance Category View */
.wrapper.show-category .home-screen,
.wrapper.show-category .category-screen {
    transform: translateX(-100%) scale(0.95); /* Add a scaling effect */
    opacity: 0.9; /* Slight fade for effect */
}

/* Adding Parallax Effect */
.wrapper.show-category .home-screen .head-wrapper,
.wrapper.show-category .category-screen .head-wrapper {
    transition: transform 0.6s ease-in-out;
    transform: translateY(-10px); /* Parallax-like effect on headers */
}

/* Backdrop behind screens */
.screen-backdrop {
    width: 135%;
    height: 25rem;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 50% 50%;
    background: linear-gradient(135deg, #39a6f0, #c724b1); /* Gradient for a dynamic look */
    z-index: -1;
    transition: transform 0.6s cubic-bezier(0.42, 0, 0.58, 1), background-color 0.6s; /* Smooth easing */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); /* Add depth */
}


/* Transform the wrapper for category view */
.wrapper.show-category .home-screen,
.wrapper.show-category .category-screen {
    transform: translateX(-100%); /* Slide screens out */
}

/* Change position of the backdrop during screen transitions */
.wrapper.show-category .screen-backdrop {
    transform: translate(-50%, -80%) scale(1.2); /* Scale and reposition */
    background: linear-gradient(135deg, #c724b1, #39a6f0); /* Reverse gradient */
}

@keyframes backdropGlow {
    0%, 100% {
        background: linear-gradient(135deg, #39a6f0, #c724b1);
    }
    50% {
        background: linear-gradient(135deg, #c724b1, #39a6f0);
    }
}

/* Header section inside the wrapper */
.head-wrapper {
    padding: 0 30px;
}

/* Menu Button Style */
.menu-btn {
    width: 2rem;
    cursor: pointer;
    color: #fff;
}

/* Welcome Screen Styling */
.welcome {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    color: #fff;
}

.welcome h1 {
    font-size: 1.5rem;
}

.welcome p {
    font-weight: 500;
}

.welcome .img {
    position: relative;
}

.welcome .img .backdrop {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3.8rem;
    height: 4rem;
    border-radius: 50%;
    background-color: #e5e7fd; /* Light background for profile image */
    z-index: -1;
}

.welcome .img img {
    width: 5rem;
}

/* Categories Screen Styling */
.categories-wrapper {
    margin-top: 1rem;
    padding: 0 30px;
    height: calc(100% - 8rem);
    padding-bottom: 20px;
    overflow: auto;
}

.categories {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Each Category Box Styling */
.category {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 10px 20px 5px #00000023;
    transition: all 0.3s;
}

/* Hover effect for category */
.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px 5px #00000040;
}

/* Left section of category (image + title) */
.category .left {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.category .left img {
    width: 3rem;
}

.category .content h1 {
    font-size: 1.5rem;
}

.category .content p {
    color: #2e2e2e;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Hidden options for category */
.category .options {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

/* Show options when category is hovered */
.category:hover .options {
    opacity: 1;
    visibility: visible;
}

/* Button to toggle category options */
.category .toggle-btn {
    width: 2rem;
    cursor: pointer;
    opacity: 0.6;
}

.category .toggle-btn:hover {
    opacity: 1;
}

/* Category Screen Header */
.category-screen .head-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-screen .head-wrapper svg {
    width: 2rem;
    cursor: pointer;
    color: #fff;
}

/* Category Details Section */
.category-details {
    padding: 0 30px;
    margin-top: 7rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-details img {
    width: 4rem;
}

.category-details .details p {
    opacity: 0.6;
}

/* Tasks Screen Styling */
.tasks-wrapper {
    padding: 0 30px;
    margin-top: 1rem;
    height: calc(100% - 12rem);
    padding-bottom: 20px;
    overflow: auto;
}

.tasks {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Task Box Styling */
.task-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Task Item */
.task {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
    width: max-content;
    cursor: pointer;
}

.task input {
    display: none; /* Hide input checkbox */
}

/* Task Checkmark Styling */
.task .checkmark {
    width: 1rem;
    height: 1rem;
    border-radius: 2px;
    border: 1px solid #2e2e2e;
    display: flex;
    justify-content: center;
    align-items: center;
}

.task .checkmark svg {
    width: 1rem;
    color: #2e2e2e;
    opacity: 0;
    transition: all 0.3s;
}

/* Show checkmark on hover */
.task:hover .checkmark svg {
    opacity: 1;
}

.task .checkmark svg path {
    stroke-width: 3;
}

/* Style when task is checked */
.task input:checked ~ .checkmark {
    background-color: #2e2e2e;
}

.task input:checked ~ .checkmark svg {
    opacity: 1;
    color: #fff;
}

.task input:checked ~ p {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Task delete button styles */
.task-wrapper .delete {
    min-width: 2rem;
    height: 2rem;
    padding: 0.5rem;
    border-radius: 50%;
    color: #2e2e2e;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.031);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.task-wrapper:hover .delete {
    opacity: 1;
    visibility: visible;
}

.task-wrapper .delete:hover {
    color: red;
    background-color: rgba(0, 0, 0, 0.1);
}

/* No Tasks Found Message */
.no-tasks {
    margin-top: 5rem;
    text-align: center;
    font-size: 1.5rem;
    opacity: 0.6;
}

/* Add Task Button Styling */
.add-task-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #39a6f0, #c724b1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}


/* Hover effect for Add Task button */
.add-task-btn:hover {
    transform: scale(1.1);
}

/* Active state for Add Task button (rotated) */
.add-task-btn.active {
    z-index: 900;
    bottom: 20rem;
    transform: rotate(45deg);
    display: block;
}

.add-task-btn svg {
    width: 2rem;
    color: #fff;
}

/* Add Task Form */
.add-task {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 20px 30px;
    transition: all 0.3s;
    display: none;
}

/* Add Task Form active state */
.add-task.active {
    bottom: 0;
    display: block;
}

.add-task .heading {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Input Field Styling */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input,
.input-group label {
    display: block;
    width: 100%;
}

/* Input box and select dropdown styling */
.input-group input,
.input-group select {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    font-size: 16px;
}

/* Label styling for input fields */
.input-group label {
    width: max-content;
    padding: 0 5px;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

/* Button Container Styling */
.btns {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
}

.btns button {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    z-index: 1;
}

/* Backdrop behind the add task screen */
.add-task-backdrop {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 135%;
    height: 20rem;
    border-radius: 50% 50% 0 0;
    background-color: white;
}

/* Black backdrop with blur for modal */
.black-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    background-color: #00000023;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    display: none;
}

/* Active state of black backdrop */
.black-backdrop.active {
    opacity: 1;
    visibility: visible;
    display: block;
}

/* Difficulty Select Box Styling */
.difficulty-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 20px;
    padding: 10px;
}

.difficulty-wrapper label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.difficulty-select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.difficulty-select:focus {
    border-color: #39a6f0;
}


/* Button Container Styling */

/* Button Base Styling */

/* Hover Effect for Buttons */


/* XP Bar Styles */
.xp-bars {
    padding: 0 30px;
    margin-top: 1rem;
}

.xp-bar {
    margin-bottom: 1rem;
}

.xp-bar h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.progress {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 20px;
    background-color: #c724b1;
    width: 0;
    transition: width 0.3s;
}

.hero {
    bottom: 15%;
}

/* Coin Display */
.coin-display {
    display: flex;
    align-items: center;
    margin-top: 20px;
  }
  
  .coin-icon {
    width: 24px; /* Adjust size as needed */
    height: 24px;
    margin-right: 8px;
  }

  .top-right-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .top-right-btn:hover {
    background-color: #0056b3;
  }
/* Improved form screen styling */
.form-screen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f7f9fc; /* Softer background for better contrast */
    z-index: 1000;
    text-align: center;
    padding: 30px 20px; /* Increased padding for a spacious feel */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Header styling for form */
.form-screen h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 700;
    margin-top: 20px;
}

/* Improved form margin and alignment */
.form-screen form {

    margin-bottom: 30000px;
    margin: auto;
    width: 100%;
    max-width: 400px;
    text-align: left;
    padding: 30px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Styling form input fields */



.form .form-title-icon {
    width: 40px; /* Adjust size as needed */
    height: 40px;
    vertical-align: middle; /* Align image with the text */
}
  

.form {
    background-color: rgb(180, 239, 250);
    border-radius: 20px;
    box-sizing: border-box;
    height: auto;
    padding: 20px;
    max-width: 320px;
    width: 90%;
    margin: 50px auto;
    outline: auto;
  }

  .form-screen {
    overflow-y: auto; /* or overflow-y: scroll; */
    max-height: 100%; /* or any other height you want */
  }


  
  .title, .subtitle {
    color: black;
    font-family: sans-serif;
    font-weight: 600;
  }
  
  .title {
    font-size: 36px;
    margin-top: 30px;
  }
  
  .subtitle {
    font-size: 16px;
    margin-top: 10px;
  }
  
  .input-container {
    height: 50px;
    position: relative;
    width: 100%;
    margin-top: 30px;
  }
  
  .input {
    background-color: rgb(232, 255, 255);
    border-radius: 12px;
    border: 1px solid transparent;
    color: #000000;
    font-size: 18px;
    height: 100%;
    padding: 4px 20px 0;
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
  }
  
  .input:focus {
    border-color: #08d;
    box-shadow: 0 0 20px rgba(8, 136, 221, 0.5);
  }
  
  .placeholder {
    color: black;
    font-family: sans-serif;
    position: absolute;
    top: 20px;
    left: 20px;
    transform-origin: 0 50%;
    transition: transform 300ms, color 300ms;
  }
  
  .input:focus ~ .placeholder,
  .input:not(:placeholder-shown) ~ .placeholder {
    transform: translateY(-30px) translateX(10px) scale(0.75);
    color: #08d;
  }
  
  .submit {
    background-color: #08d;
    border-radius: 12px;
    color: #eee;
    cursor: pointer;
    font-size: 18px;
    height: 50px;
    margin-top: 38px;
    outline: none;
    text-align: center;
    width: 100%;
    transition: background-color 0.3s;
  }
  
  .submit:hover {
    background-color: #06b;
  }
  
  
  .submit:active {
    background-color: #06b;
  }
  

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    outline: none;
}

/* Styling buttons */
.btns button {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btns button:hover {
    background-color: #0056b3;
}


.form-screen .back-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-screen .back-btn:hover {
    background-color: #0056b3;
}


  .leaderboard-screen {
    
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f7f9fc; /* Softer background for better contrast */
    z-index: 1000;
    text-align: center;
    padding: 30px 40px; /* Increased padding for a spacious feel */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  .leaderboard-screen h2 {
    font-size: 2em;
    margin-bottom: 20px;
  }


  .leaderboard-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .leaderboard-btn :hover {
    background-color: #0056b3;
  }

 
#leaderboard {
    background-color: light-gray;
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
 
#leaderboard h2 {
    text-align: center;
    margin-bottom: 30px;
}
 
.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 10px;
    background-color: powderblue;
    border-radius: 12px;
}
 
.leaderboard-item .rank {
    font-size: 24px;
    font-weight: bold;
    color: #333333;
}
 
.leaderboard-item .name {

    font-size: 18px;
    color: #333333;
}
 
.leaderboard-item .score {
    font-size: 18px;
    color: #333333;
}

#leaderboard-back-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#leaderboard-back-btn:hover {
    background-color: #0056b3;
}
#star-icon {
    width: 24px; /* Adjust size as needed */
    height: 24px; /* Adjust size as needed */
    vertical-align: middle; /* Aligns the icon with the text */
    margin-left: 8px; /* Adds space between the text and icon */
  }

/* Form screen transition */
.form-screen.slide-in {
    animation: slideInFromRight 0.5s forwards;
}

.form-screen.slide-out {
    animation: slideOutToRight 0.5s forwards;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* Leaderboard screen transition */
.leaderboard-screen.fade-in {
    animation: fadeIn 0.5s forwards;
}

.leaderboard-screen.fade-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.form-image {
    display: inline-block;
    width: 150px;
    height: 150px;
    margin-left: 5px;
    top: 10px;
  }
