:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient: linear-gradient(135deg, #20202a 0%, #151525 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #e0e0e0;
    --neon-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    --hover-neon: 0 0 25px rgba(102, 126, 234, 0.7);
}

[data-theme="light"] {
    --bg-gradient: linear-gradient(135deg, #f0f2f5 0%, #dfe3ee 100%);
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 25px;
    transition: all 0.3s ease;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.nav-links a:hover {
    color: #667eea;
    opacity: 1;
    text-shadow: 0 0 8px rgba(102, 126, 234, 0.4);
}

.settings-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}
.settings-btn:hover {
    transform: rotate(90deg) scale(1.1);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 80px 20px 40px;
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    text-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.hero-tagline {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 30px;
}

.version-badge {
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 15px 0;
    border: 1px solid rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.15);
}

.hero-cta {
    background: var(--primary-gradient);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--neon-shadow);
}

.hero-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--hover-neon);
}

/* Stats Section */
.highlights-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stats-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 20px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stats-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.1);
}

.stats-card h3 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 5px;
}

/* Pages Views & Animations */
.page-view {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page-view.active {
    display: block;
}

.glass-panel {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.glass-panel h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-panel p {
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.glass-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.glass-form input, .glass-form textarea {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    border-radius: 10px;
    padding: 12px;
}

/* About Page & Creators Styling */
.about-container {
    text-align: center;
    max-width: 900px !important;
}

.about-title {
    margin-bottom: 30px;
}

.about-section {
    margin-bottom: 50px;
    text-align: left;
}

.about-container h3 {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-section p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.creators-intro {
    font-style: italic;
    margin-bottom: 30px !important;
}

.creator-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.creator-card {
    background: rgba(102, 126, 234, 0.08);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none !important;
    color: var(--text-color) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.creator-card:hover {
    transform: translateY(-4px);
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    color: white !important;
}

.creator-card:hover .creator-icon,
.creator-card:hover .creator-info strong,
.creator-card:hover .creator-info span {
    color: white !important;
    -webkit-text-fill-color: white !important;
    opacity: 1;
}

.creator-icon {
    font-size: 2rem;
    color: #667eea;
}

.creator-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.creator-info strong {
    font-size: 1.1rem;
    margin-bottom: 2px;
    font-weight: 700;
}

.creator-info span {
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

@media (max-width: 600px) {
    .about-section {
        text-align: center;
    }
    .about-container h3 {
        justify-content: center;
    }
    .creator-card {
        flex-direction: column;
        text-align: center;
    }
    .creator-info {
        text-align: center;
    }
}

/* Contact Methods */
.contact-methods {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    text-align: center;
}

.contact-hint {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.9;
    max-width: 400px;
    line-height: 1.5;
}

.contact-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 220px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.contact-btn span {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Footer Section */
.footer {
    text-align: center;
    padding: 30px 20px;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-color);
    opacity: 0.7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    color: #667eea;
}

.footer-pwa-container {
    margin: 20px 0;
}

.footer-install-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.footer-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 20px;
}

.footer-brand {
    font-size: 0.85rem;
    opacity: 0.5;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.copyright-text {
    font-size: 0.75rem;
    color: #888;
    margin-top: 15px;
    opacity: 0.8;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--glass-border);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromRight {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-right {
    animation: slideInFromRight 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left {
    animation: slideInFromLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Search Bar */
.search-container {
    display: flex;
    justify-content: center;
    padding: 25px 20px;
}

.search-bar {
    width: 100%;
    max-width: 500px;
    padding: 15px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    background: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-bar:focus {
    outline: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Search Results Dropdown */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 5px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.recent-searches-section {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.recent-search-title {
    padding: 8px 16px;
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-search-item {
    padding: 10px 16px;
    cursor: pointer;
    color: #666;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.recent-search-item:hover {
    background: #f5f5f5;
}

.recent-search-item::before {
    content: '🕐 ';
    margin-right: 8px;
}

.search-results-list {
    padding: 8px 0;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease;
    border-left: 3px solid transparent;
}

.search-result-item:hover {
    background: #f9f9f9;
    border-left-color: #667eea;
}

.search-result-icon {
    font-size: 1.5rem;
}

.search-result-content {
    flex: 1;
}

.search-result-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.search-result-type {
    font-size: 0.85rem;
    color: #999;
}

.search-result-folder {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 500;
}

.no-results {
    padding: 20px 16px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Back Button */
.back-button-container {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: slideInDown 0.3s ease;
}

.back-button {
    background: #1e293b;
    color: white;
    border: 1px solid #334155;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-button:hover {
    background: #0f172a;
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.current-folder-title {
    color: white;
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Folders Grid */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    animation: fadeIn 0.3s ease;
}

/* Folder Cards */
.folder-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.folder-card.long-pressing {
    transform: scale(0.98);
}

.folder-card.favorite-folder {
    border: 2px solid #ffc107;
}

.folder-favorite-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1.1rem;
    z-index: 2;
}

.folder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.4s ease;
    z-index: -1;
}

.folder-card:hover::before {
    left: 0;
}

.folder-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 16px 32px rgba(102, 126, 234, 0.4);
    color: white;
    border-color: rgba(102, 126, 234, 0.8);
}

.folder-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: inline-block;
}

.folder-name {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
}

.folder-count {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: 500;
}

.folder-card:hover .folder-count {
    opacity: 1;
    color: rgba(255, 255, 255, 0.9);
}

/* Tools Container */
.tools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeInScale 0.4s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tool Cards */
.tool-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: rgba(102, 126, 234, 0.8);
}

.tool-card-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 8px;
}

.tool-actions {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover .tool-actions {
    opacity: 1;
}

.tool-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.tool-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.2);
}

.favorite-btn {
    color: #ffc107;
}

.favorite-btn.unfavorited {
    color: #999;
}

.pin-btn {
    color: #ff6b6b;
}

.pin-btn.unpinned {
    color: #999;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.08);
    filter: drop-shadow(0 6px 10px rgba(102, 126, 234, 0.35));
}

.tool-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #000;
}

#toolTitle {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2rem;
}

/* Tool Content Styling */
.tool-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: 600;
    color: #333;
}

input, textarea, select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    padding: 12px 20px;
    min-height: 44px; /* Ensure better touch target size */
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Global Input Group Utility */
.input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 20px;
}

.input-group input, 
.input-group select {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.input-group button {
    padding: 12px 24px;
    white-space: nowrap;
    border-radius: 10px;
    min-height: 44px;
}

/* Control Group for clusters of action buttons (Start, Stop, etc.) */
.control-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-top: 24px;
    margin-bottom: 20px;
}

.control-group button {
    flex: 1;
    min-height: 44px;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-group button {
    flex: 1;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-danger:hover {
    box-shadow: 0 8px 16px rgba(245, 87, 108, 0.3);
}

/* Calculator Styling */
.calculator-wrapper {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 30px;
    padding: 30px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 380px;
    margin: 20px auto;
}

.calc-input-display {
    margin-bottom: 30px;
}

.calc-input-field {
    width: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #1a1a1a;
    text-align: right;
    font-size: 3rem;
    padding: 25px 20px;
    border-radius: 20px;
    border: none;
    word-wrap: break-word;
    word-break: break-all;
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.1);
    font-weight: 300;
    letter-spacing: 2px;
    min-height: 80px;
    display: flex;
    align-items: center;
    font-family: 'Courier New', monospace;
}

.calc-input-field:focus {
    outline: none;
}

.calculator {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calc-btn {
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.calc-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.calc-btn.number {
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    color: #1a1a1a;
}

.calc-btn.number:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #d8d8d8 100%);
}

.calc-btn.operator {
    background: linear-gradient(135deg, #a8d8f5 0%, #7ec9ed 100%);
    color: #1a1a1a;
    font-weight: 800;
}

.calc-btn.operator:hover {
    background: linear-gradient(135deg, #b8e0f7 0%, #88cff0 100%);
}

.calc-btn.clear {
    background: linear-gradient(135deg, #a8d8f5 0%, #7ec9ed 100%);
    color: #1a1a1a;
    font-weight: 800;
}

.calc-btn.clear:hover {
    background: linear-gradient(135deg, #b8e0f7 0%, #88cff0 100%);
}

.calc-btn.backspace {
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    color: #1a1a1a;
    font-size: 1.6rem;
}

.calc-btn.backspace:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #d8d8d8 100%);
}

.calc-btn.equals {
    background: linear-gradient(135deg, #5a5a8a 0%, #3d3d6b 100%);
    color: white;
    font-weight: 900;
    grid-column: 3 / 5;
}

.calc-btn.equals:hover {
    background: linear-gradient(135deg, #66669a 0%, #434375 100%);
}

.calc-btn.percent {
    background: linear-gradient(135deg, #a8d8f5 0%, #7ec9ed 100%);
    color: #1a1a1a;
    font-weight: 800;
}

.calc-btn.percent:hover {
    background: linear-gradient(135deg, #b8e0f7 0%, #88cff0 100%);
}

/* To-Do List Styling */
.todolist-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.todo-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.todo-input-group input {
    flex: 1;
}

.todo-list {
    list-style: none;
    margin-top: 15px;
}

.todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    gap: 10px;
}

.todo-item.completed span {
    text-decoration: line-through;
    color: #999;
}

.todo-item input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.todo-delete {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.todo-delete:hover {
    background: #ff5252;
}

.empty-message {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

/* Unit Converter Styling */
.converter-group {
    display: flex;
    gap: 12px;
    margin: 10px 0;
    align-items: stretch;
}

.converter-group input {
    flex: 1;
}

.converter-info {
    background: #f0f0f0;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.95rem;
}

/* Password Generator */
.generated-password {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.1rem;
    word-break: break-all;
    text-align: center;
    margin: 10px 0;
    border: 2px dashed #667eea;
}

.password-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Password Saver */
.password-list {
    list-style: none;
    margin-top: 15px;
}

.password-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #764ba2;
}

.password-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.password-app-name {
    font-weight: 600;
    color: #333;
}

.password-toggle {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.password-toggle:hover {
    background: #764ba2;
}

.password-text {
    font-family: monospace;
    padding: 10px;
    background: white;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
}

.password-item-actions {
    display: flex;
    gap: 8px;
}

.password-item-actions button {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Toast Notification */
.toast {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease;
    z-index: 2000;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #f44336;
}

/* PDF Tools Styling */
.pdf-upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    margin-bottom: 20px;
}

.pdf-upload-area:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, #f0f4ff 0%, #f5e8ff 100%);
}

.pdf-upload-area.drag-active {
    border-color: #667eea;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.2);
}

.pdf-upload-content {
    pointer-events: none;
}

.pdf-upload-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.pdf-upload-text h3 {
    color: #333;
    margin-bottom: 5px;
}

.pdf-upload-text p {
    color: #666;
    margin-bottom: 8px;
}

.pdf-upload-text small {
    color: #999;
    display: block;
}

/* Image Upload Area */
.image-upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    margin-bottom: 20px;
}

.image-upload-area:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, #f0f4ff 0%, #f5e8ff 100%);
}

.image-upload-area.drag-active {
    border-color: #667eea;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.2);
}

.image-upload-content {
    pointer-events: none;
}

.image-upload-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.compression-btn {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.compression-btn:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* File Preview */
.file-preview {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.file-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    border-radius: 6px;
}

.file-icon {
    font-size: 1.5rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.file-size {
    font-size: 0.85rem;
    color: #999;
}

/* PDF Features */
.pdf-features {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-section {
    margin-bottom: 20px;
}

.feature-section:last-child {
    margin-bottom: 0;
}

.feature-section h4 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

/* Progress Bar */
.pdf-progress {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.progress-message {
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
}

.progress-bar {
    background: #e0e0e0;
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.3s ease;
}

.progress-percent {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

/* Merge Order List */
.merge-order-list {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.merge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: move;
    transition: all 0.2s ease;
}

.merge-item:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.drag-handle {
    color: #999;
    cursor: grab;
    font-size: 1.2rem;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .modal-content {
        margin: 20% auto;
        max-width: 90%;
        padding: 20px;
    }

    .tool-card {
        padding: 15px;
        min-height: 120px;
    }

    .calculator {
        gap: 8px;
    }

    .calc-btn {
        padding: 15px;
        font-size: 1.1rem;
    }

    .calc-display {
        font-size: 2rem;
        padding: 20px;
    }

    .calculator-wrapper {
        max-width: 95%;
        padding: 15px;
    }

    .menu-btn {
        display: block;
    }

    .nav-right {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: auto;
        background: rgba(20, 20, 35, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 40px 20px;
        gap: 30px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-right.show {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .nav-links a {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    .tool-icon {
        font-size: 2rem;
    }

    .tool-name {
        font-size: 0.9rem;
    }

    .search-bar {
        font-size: 0.95rem;
        padding: 12px 16px;
    }

    .modal-content {
        margin: 30% auto;
        padding: 15px;
    }

    .calculator {
        gap: 6px;
    }

    .calc-btn {
        padding: 12px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .calc-display {
        font-size: 1.8rem;
        padding: 15px;
        margin-bottom: 15px;
    }

    .calculator-wrapper {
        max-width: 100%;
        padding: 12px;
        border-radius: 15px;
    }

    .search-results {
        max-height: 300px;
        max-width: 100%;
        left: 0;
        right: 0;
        transform: none;
        border-radius: 8px;
        margin-top: 8px;
    }

    .search-result-item {
        padding: 10px 12px;
    }

    .search-result-icon {
        font-size: 1.3rem;
    }

    .back-button-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .back-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .current-folder-title {
        font-size: 1.4rem;
    }
}

/* Old settings-btn removed for new Navbar layout */

/* Settings Modal */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.settings-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.settings-panel {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.settings-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.settings-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.settings-close:hover {
    color: #333;
}

.settings-content {
    padding: 20px;
}

.settings-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section h3 {
    margin: 0 0 12px 0;
    color: #667eea;
    font-size: 1.1rem;
}

.settings-option {
    margin-bottom: 12px;
}

.settings-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
}

.settings-option input[type="radio"],
.settings-option input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

#favoritesList {
    font-size: 0.9rem;
    max-height: 180px;
}

.favorite-item {
    padding: 6px 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-item button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.install-app-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
}

.install-app-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(102, 126, 234, 0.35);
    filter: brightness(1.05);
}

.install-app-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 5px 12px rgba(102, 126, 234, 0.25);
}

.install-app-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    filter: grayscale(0.2);
}

.install-app-btn.is-installed {
    background: linear-gradient(135deg, #2e9d66 0%, #2ab27b 100%);
    box-shadow: 0 6px 16px rgba(42, 178, 123, 0.25);
}

.install-app-hint {
    margin: 10px 0 0 0;
    font-size: 0.86rem;
    color: #666;
}

/* Dark Mode */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e0e0e0;
}

body.dark-mode .header {
    background: rgba(0, 0, 0, 0.4);
}

body.dark-mode .search-bar {
    background: #333;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .search-bar::placeholder {
    color: #999;
}

body.dark-mode .search-results {
    background: #2d2d2d;
    border-color: #555;
}

body.dark-mode .folder-card,
body.dark-mode .tool-square,
body.dark-mode .tool-form {
    background: #2d2d2d;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .settings-panel {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .settings-header {
    border-color: #555;
}

body.dark-mode .settings-section {
    border-color: #555;
}

body.dark-mode .install-app-btn {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

body.dark-mode .install-app-hint {
    color: #b7b7b7;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode input[type="date"],
body.dark-mode input[type="password"],
body.dark-mode textarea,
body.dark-mode select {
    background: #3d3d3d;
    color: #e0e0e0;
    border-color: #555;
}

/* Font Size Classes */
body.font-small {
    font-size: 13px;
}

body.font-medium {
    font-size: 16px;
}

body.font-large {
    font-size: 19px;
}

/* Card Size Classes */
body.card-compact .folder-card,
body.card-compact .tool-square {
    padding: 12px;
}

body.card-normal .folder-card,
body.card-normal .tool-square {
    padding: 20px;
}

/* Expense Tracker UI */
.expense-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9edf5;
    padding: 12px;
    margin-bottom: 10px;
}

.expense-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

@media (max-width: 600px) {
    .install-app-btn {
        font-size: 0.9rem;
        padding: 11px 14px;
    }
}

.expense-stat-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9edf5;
    padding: 14px;
}

.expense-stat-label {
    font-size: 0.85rem;
    color: #667;
    margin-bottom: 6px;
}

.expense-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #3f51b5;
}

.expense-budget-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9edf5;
    padding: 12px;
    margin-bottom: 12px;
}

.expense-progress {
    margin-top: 10px;
    height: 8px;
    background: #eceff5;
    border-radius: 8px;
    overflow: hidden;
}

.expense-progress > div {
    height: 100%;
    border-radius: 8px;
}

.expense-warning {
    margin-top: 8px;
    color: #d32f2f;
    font-weight: 600;
    font-size: 0.9rem;
}

.expense-chart-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9edf5;
    padding: 14px;
    margin-top: 12px;
}

.expense-legend {
    margin-top: 12px;
    display: grid;
    gap: 6px;
}

.expense-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
}

.expense-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.expense-tip-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9edf5;
    padding: 12px;
    margin-bottom: 10px;
}

/* Animation Control */
body.no-animations * {
    animation: none !important;
    transition: none !important;
}

/* Mobile Responsive Fixes */
@media (max-width: 650px) {
    .navbar {
        flex-wrap: wrap;
        padding: 10px 15px;
    }
    .nav-logo {
        flex: 1;
        font-size: 1.2rem;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
        gap: 15px;
    }
    .nav-links a {
        font-size: 0.95rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 10px;
        word-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }

    .highlights-section {
        gap: 15px;
    }
    
    .stats-card {
        min-width: 120px;
        padding: 15px 20px;
    }
    
    .stats-card h3 {
        font-size: 1.6rem;
    }
}

/* --- Navbar Hamburger Fix --- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-btn {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 650px) {
    .navbar {
        padding: 10px 15px !important;
        position: relative !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }
    .nav-logo {
        flex: none !important;
        font-size: 1.2rem !important;
    }
    .menu-btn {
        display: block !important;
    }
    .nav-right {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        right: 15px !important;
        left: auto !important;
        background: var(--bg-gradient) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: 12px !important;
        padding: 15px 25px !important;
        gap: 15px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
        transform: translateY(-10px) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
        width: max-content !important;
    }
    .nav-right.show {
        transform: translateY(10px) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .nav-links {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: flex-end !important;
        width: 100% !important;
        margin-top: 0 !important;
    }
    .nav-links a {
        font-size: 1.1rem !important;
    }
    .settings-btn {
        align-self: flex-end !important;
        margin-top: 0 !important;
        position: static !important;
    }
}

/* ==================== HEALTH UTILITY HUB STYLES ==================== */
.health-tool-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
}

.health-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.health-input-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    opacity: 0.9;
}

.health-input-row {
    display: flex;
    gap: 10px;
}

.health-input {
    flex: 1;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.health-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.health-select {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 80px;
    transition: all 0.3s ease;
}

[data-theme="light"] .health-input {
    background: #ffffff;
    color: #333;
}

[data-theme="light"] .health-select {
    background: #ffffff;
    color: #333;
}

.health-select option {
    background: #20202a;
    color: #e0e0e0;
}

[data-theme="light"] .health-select option {
    background: #ffffff;
    color: #333;
}

.health-result-box {
    margin-top: 15px;
    padding: 25px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.health-main-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.health-main-val strong {
    color: #667eea;
    font-size: 2.2rem;
}

.health-sub-val {
    margin-top: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
}

.bmi-green { color: #2ecc71; background: rgba(46, 204, 113, 0.15); border: 1px solid rgba(46, 204, 113, 0.3); }
.bmi-yellow { color: #f1c40f; background: rgba(241, 196, 15, 0.15); border: 1px solid rgba(241, 196, 15, 0.3); }
.bmi-red { color: #e74c3c; background: rgba(231, 76, 60, 0.15); border: 1px solid rgba(231, 76, 60, 0.3); }

.health-warning {
    font-size: 0.85rem;
    color: #e74c3c;
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    opacity: 0.9;
}

.health-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: -10px;
    margin-bottom: 5px;
}

.health-preset-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.health-preset-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.health-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 10px;
}

.health-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.health-schedule-box {
    margin-top: 20px;
}

.med-schedule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: transform 0.2s;
    animation: slideInFromLeft 0.3s ease forwards;
}

.med-schedule-item:hover {
    transform: translateX(5px);
    border-color: #667eea;
}

.med-time {
    font-weight: 800;
    color: #667eea;
    font-size: 1.1rem;
}

.med-name {
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.9;
}
/* ==================== NOTIFICATION & REMINDER UI ==================== */
.notif-status {
    margin-bottom: 20px;
    display: block;
    cursor: pointer;
}

.status-icon {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-icon.success {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-icon.warning {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
    cursor: pointer;
}

.status-icon.danger {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.active-reminders-container {
    margin-top: 25px;
    animation: fadeIn 0.5s ease;
}

.active-reminders-container h4 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reminder-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.reminder-card:hover {
    transform: translateX(5px);
    border-color: #667eea;
}

.reminder-info {
    flex: 1;
}

.reminder-title {
    font-weight: bold;
    font-size: 1rem;
    color: var(--text-color);
}

.reminder-time {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 4px;
}

.delete-rem-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    filter: grayscale(1);
    transition: all 0.2s;
}

.delete-rem-btn:hover {
    filter: grayscale(0);
    transform: scale(1.1);
}

/* Extra Mobile Responsiveness Fixes (<480px) */
@media (max-width: 480px) {
    .modal-content {
        padding: 24px 20px;
        margin: 5% 15px;
        width: calc(100% - 30px);
    }
    
    #toolTitle {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .input-group, .todo-input-group, .converter-group {
        gap: 8px;
    }
    
    input, select, button, .health-input, .health-select {
        padding: 10px 14px !important;
        font-size: 0.95rem !important;
        border-radius: 8px !important;
    }
    
    .input-group button, .todo-input-group button, .control-group button {
        padding: 10px 18px !important;
        min-height: 42px !important; /* Slightly smaller but still accessible */
    }
    
    .control-group {
        margin-top: 20px;
        gap: 10px;
    }
    
    .folder-card {
        padding: 25px 15px;
        min-height: 170px;
    }
    
    .folder-icon {
        font-size: 2.8rem;
    }
    
    .folder-name {
        font-size: 1.05rem;
    }
}

/* Very Small Mobile (<380px) */
@media (max-width: 380px) {
    .modal-content {
        padding: 20px 16px;
    }
    
    .input-group, .todo-input-group, .converter-group {
        gap: 6px;
    }
    
    .input-group button, .todo-input-group button {
        padding: 8px 14px !important;
        font-size: 0.9rem !important;
        min-width: 70px;
    }
    
    #toolTitle {
        font-size: 1.4rem;
    }
    
    .folder-card {
        padding: 20px 12px;
        min-height: 150px;
    }
    
    .folder-icon {
        font-size: 2.4rem;
        margin-bottom: 10px;
    }
    
    .folder-name {
        font-size: 1rem;
    }
}
