/* Global Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 0;
    padding-right: 4rem;
    background-color: #1e1e1e;
    color: #dcddde;
    min-height: 100vh;
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1.1px, transparent 1px);
    background-size: 25px 25px;
    background-position: 0 0, 20px 20px;
    display: flex;
    flex-direction: column;
}

/* Vertical Navigation Bar */
.vertical-navbar {
    position: fixed;
    left: 0;  /* Changed from right to left */
    top: 0;
    height: 100%;
    width: 4rem;
    background-color: #1a1b1e;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}

.vertical-navbar .bottom-section {
    margin-top: auto;
    padding: 1rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background-color: #1a1b1e;
    border-top: 1px solid rgba(76, 175, 80, 0.1);
}

/* Adjust body padding for left sidebar */
body {
    padding-left: 4rem;
    padding-right: 0;
}

/* Logo Section */
.vertical-navbar .logo {
    padding: 1.5rem 0;
    height: auto;
}

.vertical-navbar .logo a {
    text-decoration: none;
    display: block;
}

.vertical-navbar .ascii-art2 {
    font-size: 12px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(0deg);  /* Changed rotation */
    color: #4CAF50;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.7);
}

/* Navigation Links */
.vertical-navbar .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    flex: 1;
}

.vertical-navbar .nav-link {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #dcddde;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    background-color: transparent;
}

.vertical-navbar .nav-link.active {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.2);
    transform: translateX(2px);
}

.vertical-navbar .nav-link:not(.active):hover {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    transform: translateX(2px);
}


.vertical-navbar .nav-link i {
    font-size: 1.25rem;
}

/* Auth Section */
.vertical-navbar .auth-section {
    padding: 0;
    border-top: none;
    margin-top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: auto;
    background-color: #1a1b1e;
    border-top: 1px solid rgba(76, 175, 80, 0.1);
}

/* Ensure consistent nav-link styling in bottom section */
.vertical-navbar .bottom-section .nav-link {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #dcddde;
    transition: all 0.2s ease;
}

/* Active state for profile link */
.vertical-navbar .bottom-section .nav-link.active {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.2);
}

.vertical-navbar .bottom-section .nav-link:hover {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    transform: translateX(2px);
}

.vertical-navbar .sign-in-button {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    background-color: transparent;
    color: #4CAF50;
    border: 1px solid #4CAF50;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vertical-navbar .sign-in-button:hover {
    background-color: rgba(76, 175, 80, 0.1);
    transform: translateX(2px);  /* Changed direction */
}

.vertical-navbar .sign-in-button i {
    font-size: 1.25rem;
}

/* Hide horizontal navbar when vertical is visible */
.navbar {
    display: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    body {
        padding-left: 0;
        padding-top: 3.5rem; /* Add space for top navbar */
    }
    
    .vertical-navbar {
        display: none; /* Hide vertical navbar on mobile */
    }
    
    .navbar {
        display: grid;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        grid-template-columns: auto 1fr auto;
        height: 3.5rem;
        padding: 0.5rem 1rem;
        background-color: #1a1b1e;
        border-bottom: 2px solid #4CAF50;
        z-index: 1000;
        align-items: center;
    }

    /* Logo for mobile */
    .navbar .logo {
        justify-self: start;
    }

    .navbar .logo .ascii-art2 {
        font-size: 14px;
        writing-mode: horizontal-tb;
        transform: none;
    }

    /* Mobile Navigation Links */
    .navbar .nav-menu {
        justify-self: center;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .navbar .nav-link {
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        color: #dcddde;
        transition: all 0.2s ease;
    }

    .navbar .nav-link:hover,
    .navbar .nav-link.active {
        background-color: rgba(76, 175, 80, 0.2);
        color: #4CAF50;
    }

    .navbar .nav-link i {
        font-size: 1.25rem;
    }

    /* Mobile Auth Section */
    .navbar .auth-section {
        justify-self: end;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .navbar .sign-in-button {
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border-radius: 8px;
        background-color: transparent;
        color: #4CAF50;
        border: 1px solid #4CAF50;
    }

    .navbar .sign-in-button:hover {
        background-color: rgba(76, 175, 80, 0.1);
    }
}

/* Handle smaller mobile screens */
@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem;
    }

    .navbar .nav-menu {
        gap: 0.5rem;
    }

    .navbar .nav-link {
        width: 2.25rem;
        height: 2.25rem;
    }

    .navbar .logo .ascii-art2 {
        font-size: 12px;
    }
}

.logo {
    justify-self: start;
}

.logo a {
    text-decoration: none;
}

.ascii-art2 {
    font-family: monospace;
    white-space: pre;
    font-size: 14px;
    color: #4CAF50;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.7);
}

.hamburger-menu {
    display: none;
    cursor: pointer;
}

.hamburger-menu .line {
    display: block;
    width: 25px;
    height: 2px;
    margin-bottom: 5px;
    background-color: #4CAF50;
}

.nav-menu {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-menu a {
    text-decoration: none;
    color: #dcddde;
    font-size: 1rem; /* Slightly reduced font size */
    font-weight: bold;
    padding: 0.4rem 0.8rem; /* Reduced padding */
    margin: 0 0.3rem; /* Reduced margin */
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: rgba(76, 175, 80, 0.2);
    border-radius: 5px;
}

.nav-menu a.active {
    background-color: rgba(76, 175, 80, 0.2);
    border-radius: 5px;
}

.auth-section {
    justify-self: end;
    display: flex;
    align-items: center;
}

.sign-in-button {
    background-color: transparent;
    color: #4CAF50;
    border: 1px solid #4CAF50;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.sign-in-button:hover {
    background-color: rgba(76, 175, 80, 0.1);
    transform: translateY(-1px);
}

/* Auth Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

.auth-modal-content {
    background-color: #1a1b1e;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 400px; /* Slightly increased for more padding space */
    padding: 2.5rem 3rem; /* Increased horizontal padding */
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}


.auth-modal-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-modal-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;  /* Reduced gap */
    margin-top: 1.5rem;  /* Added margin top */
}

/* Input Container */
.input-container {
    width: 100%;
    position: relative;
}

.input-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.input-hint {
    color: rgba(255, 255, 255, 0.6);  /* Lighter gray */
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;  /* Slight left padding */
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8e9193;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #4CAF50;
}

/* Adjust input padding to accommodate the icon */
.input-container input[type="password"],
.input-container input[type="text"] {
    padding-right: 40px;
}

/* Optional: Add a subtle animation for the icon change */
.password-toggle i {
    transition: transform 0.2s ease;
}

.password-toggle:active i {
    transform: scale(0.9);
}

/* Input Fields */
.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);  /* Much darker background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: rgba(255, 255, 255, 0.07);  /* Slightly lighter when focused */
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4); 
}

/* Animation for switching between sign in and sign up */
.signin-fields,
.signup-fields {
    animation: fadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Submit Button */
.auth-submit {
    margin-top: 1rem; /* Increased top margin */
    width: 100%;
    padding: 1rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-submit:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

/* Alternative Action Text */
.auth-alternative {
    margin-top: 1.75rem; /* Increased margin */
    text-align: center;
    color: #a0a0a0;
    font-size: 0.875rem;
}

.auth-alternative a {
    color: #4CAF50;
    text-decoration: none;
    cursor: pointer;
    margin-left: 0.25rem; /* Added space before link */
    font-weight: 500; /* Made link slightly bolder */
}

.auth-alternative a:hover {
    text-decoration: underline;
}

/* Animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus States */
.auth-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* Active States */
.auth-submit:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .auth-modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }
}

/* Profile Button in Header */
.header-profile-btn {
    background: none;
    border: none;
    color: #4CAF50;
    padding: 0.5rem;
    margin-left: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.header-profile-btn:hover {
    background-color: rgba(76, 175, 80, 0.1);
}

/* Profile Page Styles */
.profile-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #1a1b1e;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.profile-picture-container {
    position: relative;
    width: 128px;
    height: 128px;
}

.profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #2a2b2e;
    border: 3px solid #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #4CAF50;
    overflow: hidden;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-picture-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #4CAF50;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-picture-edit:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.profile-username {
    color: #8e9193;
    font-size: 1rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    color: #8e9193;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    color: #ffffff;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    background-color: #2a2b2e;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1 0 auto;
}

/* Layout */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 30px;
}

@media (min-width: 1201px) {
    .header-content {
        padding-left: calc((100% - 1200px) / 2 + 20px);
        padding-right: calc((100% - 1200px) / 2 + 20px);
    }
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

#app-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Typography */
h1 {
    color: #ffffff;
}

/* ASCII Art */
.ascii-art {
    font-family: monospace;
    white-space: pre;
    display: block;
    font-size: 8px;
    line-height: 1.1;
    margin: 20px 0;
    color: #4CAF50;
    text-align: center;
    overflow-x: auto;
    max-width: 100%;
}

@media (min-width: 768px) {
    .ascii-art {
        font-size: 12px;
    }
}

@media (min-width: 1200px) {
    .ascii-art {
        font-size: 14px;
    }
}

/* Habit Controls */
#habit-controls {
    flex: 0 1 auto;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;

}

/* Daily Quote */
#daily-quote {
    flex: 1;
    text-align: right;
    font-style: italic;
    color: #a0a0a0;
    padding: 15px;
    border-right: 3px solid #4CAF50;
    line-height: 1.6;
    max-width: 50%;
    margin-left: 20px;
}

#daily-quote a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s ease;
}

#daily-quote a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Data Controls */
#data-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
}

#data-controls button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 15px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

#data-controls button:hover {
    background-color: #45a049;
}

/* Add Habit Form */
#add-habit {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background-color: rgba(47, 49, 54, 0.6);
    border-radius: 5px;
    padding: 15px;
    max-width: 500px;
    gap: 10px;
    flex: 1;
}

#new-habit {
    flex-grow: 1;
}

#new-habit::part(base) {
    background-color: #2f3136;
    border-color: #40444b;
}

#new-habit::part(input) {
    color: #dcddde;
}

#new-habit::part(input)::placeholder {
    color: #6e7176;
    font-style: italic;
}

#new-habit::part(suffix) {
    color: #6e7176;
}

.custom-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background-color: #4f545c;
    color: #dcddde;
    font-size: 10px;
    font-weight: bold;
    cursor: default;
}

sl-button::part(base) {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

sl-button:hover::part(base) {
    background-color: #45a049;
    border-color: #45a049;
}

/* Hide view switcher on mobile */
@media (max-width: 768px) {
    .view-switcher {
        display: none !important;
    }
}

/* View Switcher Styles */
#view-controls {
    display: flex;
    align-items: center;
}

.view-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.view-button {
    background: none;
    border: 1px solid #4CAF50;
    color: #4CAF50;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-button:hover {
    background-color: rgba(76, 175, 80, 0.1);
    transform: translateY(-1px);
}

.view-button.active {
    background-color: #4CAF50;
    color: white;
}

/* Habit Item */
.habit {
    background-color: rgba(47, 49, 54, 0.6);
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
    position: relative;
    transition: background-color 0.3s ease;
}

.habit-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: nowrap;
}

.habit-name {
    font-weight: bold;
    font-size: 24px;
    margin-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.habit-name span {
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.habit-name span::after {
    position: absolute;
    left: -2px;
    right: -2px;
    top: -1px;
    bottom: -1px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.habit-name span:hover::after {
    opacity: 1;
}

.habit-name-and-tags {
    display: flex;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
}

.habit-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    max-width: 60%;
    overflow: hidden;
}

.habit-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.stats-info {
    display: grid;
    grid-template-columns: auto auto; 
    gap: 8px 32px;
    flex-grow: 0;  
    margin-right: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stat-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
}

.habit-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Adjust intensity meter if needed */
.intensity-meter {
    margin-right: 4px;  /* Reduced margin */
}

.delete-habit, .edit-habit {
    color: #666;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.delete-habit:hover {
    background-color: #ff1a1a;
    color: white;
}

.edit-habit:hover {
    background-color: #03ff18;
    color: white;
}

/* Heatmap */
.heatmap {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    gap: 2px;
    min-width: 951px;
}

.heatmap-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.months {
    display: flex;
    margin-bottom: 5px;
    padding-left: 50px;
    font-size: 12px;
    color: #888;
}

.month {
    display: inline-block;
    text-align: left;
    font-size: 14px;
    font-weight: bold;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 2px;
}

.week {
    display: grid;
    grid-template-columns: 50px repeat(53, 1fr);
    gap: 1px;
    align-items: center;
}

.week > div:nth-child(2) {
    margin-left: 5px;
}

.weekday {
    width: 50px; 
    text-align: right;
    font-size: 14px;
    color: #888;
    font-weight: bold;
}

.day {
    width: 15px;
    height: 15px;
    background-color: #2f3136;
    cursor: pointer;
    margin-right: 2px;
    border-radius: 2px;
    position: relative;
    transition: background-color 0.3s ease;
}

.day.out-of-range {
    opacity: 0.2;
    pointer-events: none;
}

.day:hover {
    transform: scale(1.2);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.day.checked {
    background-color: var(--day-color, #4CAF50);
}

.day.today {
    border: 1px solid #ffffff;
}

.day.has-note {
    position: relative;
}

.heatmap .day.has-note::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #fff;
    opacity: 0.7;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

/* Calendar note indicator */
.calendar-view .day.has-note::after {
    content: '•';
    position: absolute;
    bottom: 4px; /* Move up from the bottom */
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #3498db;
    line-height: 1;
}

/* Mobile calendar note indicator */
.mobile-month-view .day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    gap: 2px;
}

/* Hover effect for note indicators */
.day.has-note:hover::after {
    transform: translateX(-50%) scale(1.2);
    opacity: 1;
}

/* Special styling for checked days with notes */
.day.has-note.checked::after {
    background-color: white;
    color: white;
}

.calendar-view .day span,
.mobile-month-view .day span {
    margin-bottom: 4px; /* Create space between number and dot */
}

/* Ensure day content remains readable */
.calendar-view .day, 
.mobile-month-view .day {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8px; /* Make space for the dot */
}

/* Date Tooltip */
#date-tooltip {
    position: fixed;
    background-color: #202225;
    color: #dcddde;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    pointer-events: none;
    display: none;
    z-index: 1000;
    max-width: 200px;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Value Log */

.value-log-dropdown {
    position: fixed;
    background-color: #1a1b1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    z-index: 9999;  /* Ensure it's above everything */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.2s ease;
    min-width: 200px;
}

.value-log-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.value-log-form .input-group {
    flex: 1;
}

.value-log-form label {
    display: block;
    font-size: 0.75rem;
    color: #a0a0a0;
    margin-bottom: 4px;
}

.value-log-form input {
    width: 100%;
    padding: 8px 12px;
    background-color: #2a2b2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.value-log-form input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.value-submit-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.value-submit-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.value-log-input::-webkit-outer-spin-button,
.value-log-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.value-log-input[type=number] {
    -moz-appearance: textfield; /* Firefox */
}

@media (max-width: 768px) {
    .value-log-dropdown {
        position: fixed;
        left: 50% !important;
        bottom: 20px;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: 400px;
        top: auto !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Log Today Button */

.confetti-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.log-today {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s, opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.log-today::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

.log-today:active::after {
    animation: button-ripple 0.6s ease-out;
}

@keyframes button-ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.log-today:hover {
    background-color: #45a049;
}

.log-today:disabled {
    background-color: #888888;
    cursor: not-allowed;
    opacity: 0.7;
}

.log-today.logged {
    background-color: #888888;
}

.log-today i {
    font-size: 14px;
}

.log-today .fa-check {
    margin-left: auto;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* Day Modal */
.day-modal-content {
    background-color: #1a1b1e;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5),
                0 8px 10px -6px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.day-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.habit-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.habit-color-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.habit-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.habit-color-dot:hover {
    transform: scale(1.2);
}

.habit-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a0a0a0;
    font-size: 0.875rem;
}

.day-date {
    color: #dcddde;
    font-size: 14px;
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    color: #a0a0a0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    z-index: 1002; /* Ensure it's above modal content */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Ensure the icon itself is clickable */
.modal-close-btn i {
    pointer-events: none; /* Prevent icon from interfering with clicks */
}

/* Status Badge */
.habit-status {
    margin: 1.5rem 1.5rem 1rem 1.5rem;
    padding: 0.75rem 1rem;
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4CAF50;
}

.status-text {
    color: #4CAF50;
    font-size: 0.875rem;
}

.esc-button {
    background-color: #40444b;
    color: #dcddde;
    border: none;
    border-radius: 25%;
    width: 28px;
    height: 28px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.esc-button:hover {
    background-color: #4f545c;
}

.stats-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.intensity-meter {
    display: flex;
    gap: 3px;
    padding: 4px;
   /* background-color: rgba(0, 0, 0, 0.2); */
    border-radius: 3px;
}

.intensity-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    transition: opacity 0.3s ease;
}

.day-modal-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 0.75rem 0;
    margin: 0 0.25rem;
}

.note-header h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #a0a0a0;
    margin: 0;
}

.note-wordcount {
    font-size: 0.75rem;
    color: #666;
}

/* Textarea Container */
.textarea-container {
    width: 100%;
    box-sizing: border-box;
}

#day-note {
    width: 100%;
    min-height: 120px;
    padding: 0.875rem 1rem;
    background-color: #2a2b2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s ease;
    margin: 0;
    box-sizing: border-box;
}

.day-modal-body h3 {
    padding: 0;
    margin-bottom: 0;
}

#day-note:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
    background-color: #2d2e31;
}

#day-note::placeholder {
    color: #666;
}

/* Footer */
.day-modal-footer {
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-picker-container label {
    font-size: 0.875rem;
    color: #a0a0a0;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#day-color-picker {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

.delete-day-button {
    padding: 0.5rem;
    color: #ff4d4d;
    background-color: rgba(255, 77, 77, 0.1);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-day-button:hover {
    background-color: rgba(255, 77, 77, 0.2);
    transform: scale(1.05);
}

#log-day-button {
    padding: 0.75rem 1.25rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
#log-day-button:not(:disabled):hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

#log-day-button:disabled {
    background-color: #666;
    cursor: not-allowed;
}

/* Animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.day-modal-content {
    animation: modalSlideIn 0.3s ease;
}

/* Customization */
.customize-icon {
    cursor: pointer;
    margin-left: 10px;
    font-size: 20px;
    color: #888;
    transition: color 0.3s ease;
}

.customize-icon:hover {
    color: #4CAF50;
}

.customization-modal-content {
    background-color: #1a1b1e;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5),
                0 8px 10px -6px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: modalSlideIn 0.3s ease;
}

/* Modal Header */
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

/* Modal Body */
.modal-body {
    padding: 1.5rem;
}

.customization-section {
    margin-bottom: 1.5rem;
}

.customization-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-header label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #a0a0a0;
}

.section-hint {
    font-size: 0.75rem;
    color: #666;
}

/* Input Styles */
.custom-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: #2a2b2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.custom-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
    background-color: #2d2e31;
}

.custom-input::placeholder {
    color: #666;
}

/* Select Styles */
.custom-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: #2a2b2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* Color Palette */
.color-palette {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background-color: #2a2b2e;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-option {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Modal Footer */
.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-cancel-btn {
    padding: 0.75rem 1.25rem;
    background-color: transparent;
    color: #a0a0a0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-cancel-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.modal-save-btn {
    padding: 0.75rem 1.25rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-save-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 640px) {
    .customization-modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Drag and Drop */
.drag-handle {
    cursor: move;
    padding: 10px;
    color: #888;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
}

.sortable-ghost {
    opacity: 0.5;
    background-color: #4CAF50;
}

.sortable-drag {
    background-color: #2f3136;
}

.habit.dragging {
    opacity: 0.5;
    transform: scale(1.05);
}

.habit-placeholder {
    background-color: rgba(76, 175, 80, 0.3);
    border: 2px dashed #4CAF50;
}

/* Animations */
@keyframes fadeOutAndCollapse {
    0% {
        opacity: 1;
        max-height: 1000px;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        max-height: 500px;
        transform: scale(0.95);
    }
    100% {
        opacity: 0;
        max-height: 0;
        transform: scale(0.9);
    }
}

.habit.deleting {
    animation: fadeOutAndCollapse 0.5s ease-out forwards;
    overflow: hidden;
}

/* Footer */
.site-footer {
    background-color: #1a1b1e;
    border-top: 1px solid rgba(76, 175, 80, 0.2);
    padding: 1rem;
    margin-top: auto;
    text-align: center;
    font-size: 0.9em;
    position: relative;
    z-index: 10;
}

.footer-content {
    color: #a0a0a0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-content a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    font-weight: 500;
}

.footer-content a:hover {
    color: #45a049;
    transform: translateY(-1px);
}

.site-footer p {
    margin: 0;
}

html, body {
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 0.75rem;
        font-size: 0.8em;
    }

    .site-footer p {
        margin: 0;
    }

    /* Add some bottom padding to content to prevent footer overlap */
    .content-wrapper {
        padding-bottom: 60px;
    }

    /* Ensure proper spacing around footer links */
    .site-footer a {
        display: inline-block;
        padding: 0.5rem;
    }
}

/* Shoelace Components Overrides */
sl-tag {
    --sl-color-neutral-50: #2c2f33;
    --sl-color-neutral-100: #36393f;
    --sl-color-neutral-200: #40444b;
    --sl-color-neutral-300: #4f545c;
    --sl-color-neutral-400: #72767d;
    --sl-color-neutral-500: #9da1a6;
    --sl-color-neutral-600: #b9bbbe;
    --sl-color-neutral-700: #dcddde;
    --sl-color-neutral-800: #f6f6f7;
    --sl-color-neutral-900: #ffffff;
    --sl-color-neutral-950: #ffffff;
    
    font-size: 12px;
    --sl-tag-font-size-small: 12px;
    --sl-tag-font-weight: 500;
    --sl-tag-background-color: var(--sl-color-neutral-200);
    --sl-tag-color: var(--sl-color-neutral-800);
    --sl-tag-border-color: var(--sl-color-neutral-300);
}

sl-tag::part(base) {
    background-color: var(--sl-color-neutral-200);
    color: var(--sl-color-neutral-800);
    border-color: var(--sl-color-neutral-300);
}
