/* Basic page styles */
html, body {
    height: auto; /* Allow height to be determined by the content */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure the body fills the screen at least */
    width: 100%;
    overflow-x: hidden;
}
.body, .content {
    flex: 1; /* Ensures the content expands to take up available space */
}


/* The main content will grow to fill available space */
body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Apply gradient to the entire background div */
.gradient-background {
    background: linear-gradient(white, grey, deepskyblue); /* Bright colors */
    background-size: 400% 400%; /* Ensures smooth gradient movement */
    animation: gradient-animation 15s ease infinite; /* Infinite smooth transition */
    min-height: 100vh; /* Make sure it covers the whole viewport */
    padding: 20px; /* Add some padding around the container */
    display: flex;
    flex-direction: column;
}

/* Keyframes for the gradient animation */
@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Main content container */
.container, .body {
    flex: 1;
    max-width: 1200px; /* Keep content within a reasonable width */
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
}

/* Adjust container width for better centering */
.container {
    max-width: 1400px; /* Reduced width for better fitting */
    margin: 0 auto;
}

/* Flexbox layout for horizontal centering */
.container-fluid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow elements to wrap */
    padding: 2px;
}

/* Row styling */
.row {
    width: 100%;
    max-width: 1300px; /* Ensures the row is not too wide */
    margin: 0 auto;    /* Centers the row content */
}


/* Login Status Styles */
.login-status {
    font-size: 16px;
    color: #555;
    background-color: #e0e0e0;
    padding: 10px;
    text-align: left;
    max-width: 200px;
    border-radius: 5px;
    position: fixed;        /* Fix the position */
    top: 20px;              /* Distance from the top of the page */
    right: 20px;            /* Distance from the right edge of the page */
    z-index: 1000;          /* Ensure it appears above other content */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Add a slight shadow for better visibility */
}


.navbar {
    background-color: transparent !important;
    padding: 10px 20px;
    border-radius: 8px; /* Rounded corners for a smoother appearance */
    box-shadow: none; /* Remove shadow to keep the navbar simple */
    margin-bottom: 20px; /* Adds space below the navbar */
}

/* Style the navigation links */
.nav-links {
    display: flex;
    justify-content: center; /* Center the links horizontally */
    gap: 20px; /* Space between each link */
    list-style-type: none; /* Remove bullet points */
    padding: 0;
    margin: 0;
    flex-wrap: wrap; /* Allow links to wrap onto a new row */
}

/* Style individual nav links */
.nav-link {
    color: #fff !important; /* Set the link text color to white to match the background */
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
}

.nav-link:hover {
    color: #FF5733 !important; /* Change color on hover */
    text-decoration: underline; /* Underline text on hover */
}
.nav-item {
    padding: 5px 10px; /* Adds some padding around each link */
    border-radius: 5px; /* Rounded edges for the links */
    background-color: rgba(255, 255, 255, 0.3); /* Slightly darker transparent background on each item */
}

.nav-item:hover {
    background-color: rgba(0, 0, 0, 0.5); /* Darker background on hover */
}

/* Headings and Text */
h1, h2, h3 {
    color: #6c63ff;
    font-weight: bold;
}

p, li {
    line-height: 1.6;
    font-size: 16px;
}

/*  Buttons */
.btn {
    background-color: #FF5733; /* Bright and contrasting orange color */
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: #C70039; /* Darker red on hover */
    transform: scale(1.05);
}

/* Form Elements */
input[type="text"], input[type="password"], input[type="email"], select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, select:focus {
    border-color: #6c63ff;
    box-shadow: 0px 0px 5px rgba(108, 99, 255, 0.5);
}

/* Gamification Elements */
.progress-bar {
    background-color: #6c63ff;
    height: 20px;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.badge-section {
    width: fit-content;
    margin: 0 auto;
    text-align: center;
}

/* Remove background, padding, and border-radius */
.reward-badge {
    display: inline-block;
    margin: 10px 5px;
    text-align: center;
    box-shadow: none; /* No shadow */
    background-color: transparent; /* No background */
    padding: 0; /* Remove padding */
    border-radius: 0; /* Remove rounded corners */
    font-size: 14px; /* Adjust font size if needed */
}

/* Badge icons */
.badge-section i.fas {
    font-size: 50px;
    margin: 10px 5px;
    color: #ffd700; /* Default Gold color for icons */
}

/* Customize specific badges */
.starter-badge {
    color: #ffeb3b; /* Yellow for Starter Badge */
}

.consistency-badge {
    color: #ff5722; /* Orange for Consistency Badge */
}

.master-badge {
    color: #4caf50; /* Green for Master Badge */
}

/* Hover effect for the icons */
.reward-badge i.fas:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Footer styles */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #6c63ff;
    color: #fff;
    border-top: 5px solid #4b42d3;
    width: 100%;
    position: relative; /* Ensures it stays at the bottom of the content */
    bottom: 0; /* Aligns it at the bottom */
    left: 0;
    margin-top: auto; /* Pushes the footer to the bottom when content is less */
}

.footer a {
    color: #ffe600;
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    text-decoration: underline;
}

.footer a.footer-link {
    color: #f5f5f5 !important; /* Force white color for the link */
    font-weight: 700; /* Strong emphasis */
    text-decoration: none; /* Remove underline */
    transition: color 0.3s ease; /* Smooth hover effect */
}

/* Login Status Styles */
.login-status {
    font-size: 16px;
    color: #555;
    background-color: #e0e0e0;
    padding: 1px;
    text-align: left;
    margin: 10px 0 10px 10px; /* Adds 20px margin on the left */
    max-width: 70px; /* Reduced width for a narrower box */
    border-radius: 5px;
}

.header h2 {
    color: #343a40;
}

.text-muted {
    color: #6c757d;
}

.blackboard-margin {
    background-color: #d2b48c; /* Light brown background for blackboard margin */
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Soft shadow to lift the content slightly */
    margin: 20px auto;
    max-width: 1200px;
}

/* Adjust header styles */
.header {
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff; /* White text for strong contrast against dark background */
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); /* Subtle shadow for the text */
}


/* Keyframes for fade-in animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Habit card styling */
.habit-card {
    background-color: #2c3e50;
    color: #e0e0e0;
    border: 2px solid #34495e;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 15px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: calc(0.3s * var(--card-index));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Hover effect for habit card */
.habit-card:hover {
    transform: translateY(-2px); /* Slight upward shift without scale */
}

/* Card title and text styling */
.habit-card .card-title {
    font-size: 1.3rem;
    color: #ffeaa7; /* Soft yellow color resembling chalk */
    margin-bottom: 2px;
    white-space: nowrap; /* Prevents the text from breaking onto a new line */
    overflow: hidden; /* Hides any overflowing text */
    text-overflow: ellipsis; /* Adds an ellipsis (...) when text overflows */
    position: relative;

}


.habit-card .card-text {
    color: #ecf0f1; /* Light color for chalk-like appearance */
    margin-bottom: 15px;
    white-space: nowrap; /* Prevents the text from breaking onto a new line */
    overflow: hidden; /* Hides any overflowing text */
    text-overflow: ellipsis; /* Adds an ellipsis (...) when text overflows */
    position: relative;
}

/* Progress bar styling */
.progress-bar {
    background-color: #ff6b6b; /* Vibrant red for contrast */
}

/* Badge styling */
.badge {
    background-color: #1abc9c; /* Soft green for badges */
    color: #ffffff; /* White text for readability */
}

.badge-primary,
.badge-success,
.badge-secondary,
.badge-warning {
    display: inline-block;
    width: 100%; /* Set a fixed width to control the ellipsis overflow */
    overflow: hidden;
    white-space: nowrap; /* Prevents wrapping */
    text-overflow: ellipsis; /* Shows "..." when text overflows */
    padding: 5px 10px; /* Adjust padding as needed */
    border-radius: 4px;
    text-align: center;
}

.badge-warning {
    background-color: #f39c12; /* Warning yellow */
}

.badge-primary {
    background-color: #3498db; /* Blue for "Almost there!" */

}

.badge-success {
    background-color: #2ecc71; /* Green for success */
    overflow: hidden; /* Hides any overflowing text */
}

.badge-secondary {
    background-color: #95a5a6; /* Grey for "Keep going!" */

}


/* Button styles */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Alert message styling */
.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}


/* General container styling */
.container {
    max-width: 1100px;
}


/* Welcome header styling */
.welcome-header h2 {
    font-size: 3rem; /* Increase the size */
    background: linear-gradient(90deg, #6a11cb, #2575fc); /* Gradient color */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* Makes the text take the gradient */
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    animation: fadeInScale 1.5s ease-out; /* Add animation */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1); /* Subtle 3D shadow */
}

/* Add a fancy underline effect */
.welcome-header h2::after {
    content: '';
    width: 60%;
    height: 4px;
    background-color: #2575fc;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: underlineSlideIn 1s ease-out forwards;
}

/* Paragraph styling */
.welcome-header p {
    color: #6c757d;
    font-size: 1.2rem;
    animation: fadeIn 2s ease-out;
}

/* Keyframe animations */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Slide-in underline animation */
@keyframes underlineSlideIn {
    0% {
        width: 0;
    }
    100% {
        width: 60%;
    }
}


/* Ensure all boxes have the same height */
.habit-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    min-height: 350px; /* Set a minimum height to ensure uniformity */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Ensure all images are the same size and aligned at the same height */
.habit-image {
    max-height: 180px;
    width: auto;
    margin: 0 auto 15px; /* Center the images */
    object-fit: contain; /* Contain the image within the given size */
}

.habit-box h4 {
    margin-top: 20px;
}

.habit-box p {
    flex-grow: 1;
}


/* Feature section styling */
.feature-img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Buttons - no changes needed since you specified they are already looking great */

/* Why Habits section styling */
.why-habits {
    background-color: #f8f9fa;
    padding: 40px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.why-habits h3 {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 20px;
}

.why-habits p {
    font-size: 1.1rem;
    color: #495057;
    max-width: 700px;
    margin: auto;
}

/* Adjust spacing for the feature section */
.row.mt-5 {
    display: flex;
    justify-content: space-between;
}

/* Ensure buttons remain unchanged */
.btn {
    transition: all 0.2s ease-in-out;
}

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

/* Button styles */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-outline-secondary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-secondary:hover {
    background-color: #007bff;
    color: #ffffff;
    border-color: #0056b3;
}


.progress {
    margin-bottom: 1rem;
}

.card-text {
    margin-top: 1rem;
}

.habit-info {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(45deg, #ff6b6b, #f94d6a);
    padding: 10px 15px;
    margin-top: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid #ff4757;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.habit-info:hover {
    transform: scale(1.05);  /* Slightly enlarge on hover for interaction */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);  /* Enhanced shadow on hover */
}


.main-content {
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.status-label {
    font-size: 1.1rem;      /* Slightly larger font size */
    font-weight: bold;      /* Bold text for emphasis */
    color: whitesmoke;         /* Darker color for better visibility */
}

.status-badge {
    display: inline-block; /* Ensures the badge respects the width set */
    max-width: 100%; /* Prevents it from overflowing outside the container */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 5px 10px; /* Adjust padding as needed */
    border-radius: 4px;
    text-align: center;
}



.no-wrap {
    white-space: nowrap; /* Prevents the text from breaking onto a new line */
}


.badge-section {
    text-align: left;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-left: -100px; /* Adjust this as needed for spacing */
}


@media only screen and (max-width: 1460px) {
    .navbar {
        font-size: 14px;
    }
    .main-content {
        padding: 10px;
    }
    h1 {
        font-size: 1.5rem; /* Smaller font size on mobile */
    }
    .col-12.col-lg-4.col-md-4 {
        width: 100%;
        padding: 5px;
    }

    .badge-section {
        margin-left: -25px;
    }

    .login-status {
        display: none;
    }

}


/*!* Specific phone sizes: iPhones (11, 12, 13 Pro Max) *!*/
/*@media only screen and (min-width: 375px) and (max-width: 430px) {*/
/*    .col-12.col-lg-4.col-md-4 {*/
/*        width: 100%;*/
/*        margin-bottom: 15px;*/
/*    }*/
/*}*/

/*!* Samsung Galaxy S23 Ultra *!*/
/*@media only screen and (min-width: 430px) and (max-width: 432px) {*/
/*    .col-12.col-lg-4.col-md-4 {*/
/*        width: 100%;*/
/*        margin-bottom: 20px;*/
/*    }*/
/*}*/

/* For small tablets and phones, hiding certain sections */
@media only screen and (max-width: 1200px) {
    .badge-section {
        display: none;
    }
}

@media only screen and (max-width: 1024px) {
    .login-status {
        display: none;
    }
}

/* For medium devices (tablets) */
@media only screen and (min-width: 1200px) {
    .navbar {
        font-size: 16px;
    }
}

/* For large devices (desktops) */
@media only screen and (min-width: 992px) {
    .navbar {
        font-size: 18px;
    }
}


/*!* Responsive layout for small screens *!*/
/*@media only screen and (max-width: 470px) {*/
/*    .nav-links {*/
/*        align-items: center;     !* Center the links *!*/
/*        gap: 10px;               !* Reduce the gap between links *!*/
/*        flex-basis: calc(50% - 10px); !* Each button takes up 50% of the row minus smaller gap *!*/

/*    }*/
/*}*/
