* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #f7f7f7;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-result: #0984e3;
    --border-color: #dee2e6;
    --accent-color: #ed4155;
    --accent-gradient: linear-gradient(135deg, #ed4155 0%, #ff8a65 100%);
    --success-color: #28a745;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #1e2024 0%, #121212 50%, #000000 100%);
    --bg-card: #1f2023;
    --bg-secondary: #2a2c30;
    --text-primary: #e6e6e6;
    --text-secondary: #a0a0a0;
    --text-result: #169aff;
    --border-color: #383b40;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.8);
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

.border-gradient {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        var(--accent-gradient) border-box;
    border-radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
    line-height: 1.5;
    font-size: 0.9rem;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    color: var(--text-primary);
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    animation: slideIn 0.3s ease forwards;
    position: relative;
    overflow: hidden;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

header {
    background: var(--bg-card);
    box-shadow: var(--shadow);
    position: sticky;
    top: 5px;
    z-index: 1000;
    transition: transform 0.3s ease-in-out, background-color 0.3s;
    border-radius: 50px;
    margin: 0rem 0.5rem;
}

header.header-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    cursor: pointer;
    display: flex;
    align-items: center;
    max-width: 200px;
}

.logo-img {
    height: 35px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0.1rem 0.1rem;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link.active {
    color: var(--accent-color) !important;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 2px;
}

.mobile-social-links {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
}

.search-input {
    padding: 0.488rem 2.5rem 0.4rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    width: 250px;
    font-size: 0.9rem;
    transition: width 0.3s;
}

.search-input:focus {
    width: 300px;
    border-color: var(--accent-color);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: bold;
    display: none;
}

.search-clear:hover {
    color: var(--accent-color);
}

.search-results-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    width: 350px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.search-results-dropdown.active {
    display: block;
}

.search-section-title {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}

.search-section-title:first-child {
    border-top: none;
}

.search-result-item {
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-icon {
    font-size: 1.2rem;
}

.search-result-text {
    display: flex;
    flex-direction: column;
}

.search-result-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.search-result-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 100px;
    padding: 0.34rem 0.0rem 0.25rem 0.05rem;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}

.mobile-menu-btn {
    display: none;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 100px;
    font-size: 1.35rem;
    cursor: pointer;
    color: var(--text-primary);
    text-align: center;
    padding: 0.3rem 0.3rem 0.2rem 0.3rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active {
    font-size: 1rem;
    transform: rotate(90deg);
    padding: 0.35rem 0.5rem 0.35rem 0.5rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    flex: 1;
    width: 100%;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    text-align: center;
    padding: 1rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.hero p {
    font-size: 1.1rem;
}

/* --- TOOLS GRID --- */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 0rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.category-tab {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.2s;
    font-size: 0.8rem;
    user-select: none;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-tab:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: var(--shadow-hover);
}

.category-tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.tool-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1rem;
    padding-bottom: 3.5rem;
    cursor: pointer;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border: 2px solid transparent;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        var(--accent-gradient) border-box;
}

.tool-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.tool-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.3;
    width: 100%;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    margin-top: auto;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 15px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-weight: 600;
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
}

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.2rem;
    max-width: 500px;
    width: 100%;
    margin: 1.5rem 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: modalSlide 0.3s ease;
    border: 2px solid var(--border-color);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.modal-header h2 {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.close-btn:hover {
    color: var(--accent-color);
}


/* --- SIDEBAR ADS (Desktop Wings) --- */

.ad-sidebar {
    width: 160px;
    height: 600px;
    /* background: var(--bg-secondary); */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5rem;
    border-radius: 8px;
    position: sticky;
    top: 2rem;
}

.ad-left {
    margin-right: 2rem;
}

.ad-right {
    margin-left: 2rem;
}

.ad-placeholder {
    color: var(--text-secondary);
    font-size: 0.8rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    opacity: 0.5;
}

@media (max-width: 950px) {
    .desktop-only {
        display: none !important;
    }
}

/* --- FORMS & INPUTS --- */
.form-group {
    margin-bottom: 1.4rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-input,
.form-select,
.textarea-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border 0.3s;
}

.form-input:focus,
.form-select:focus,
.textarea-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.flex-row {
    display: flex;
    gap: 0.5rem;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 64, 0, 0.797);
}

.btn-secondary {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.btn-secondary:hover {
    background: var(--border-color);
}

.result-box {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-value {
    font-weight: 700;
    color: var(--text-result);
}

.hidden {
    display: none !important;
}

.content-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.content-section h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.content-section p {
    margin-bottom: 1rem;
}

/* -----Cash Counter Styles----- */
.cash-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.cash-m {
    margin: 0 0.5rem
}

.cash-label {
    width: 60px;
    font-weight: bold;
    font-size: 1.1rem;
}

.cash-input {
    flex: 1;
    margin-bottom: 0;
    text-align: right;
    font-weight: bold;
}

.cash-total {
    width: 70px;
    text-align: right;
    font-weight: 600;
    color: var(--text-result);
    font-size: 1rem;
}

.cash-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Design Tools Styles */
.color-preview-box {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.code-block {
    background: var(--bg-card);
    color: #eaeaea;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    overflow-x: auto;
    margin-top: 1rem;
    position: relative;
}

.copy-code-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--text-primary);
    border: none;
    color: var(--border-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    cursor: pointer;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #121212;
}

/* --------- FOOTER --------- */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 1.5rem 1rem 0.5rem;
    margin-top: auto;
    width: 100%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.3rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    cursor: pointer;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.follow {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.social-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.social-link {
    display: flex;
    transition: transform 0.2s ease;
}

.social-link:hover {
    transform: translateY(-3px);
}

.social-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.social-icon-yt {
    width: 21px;
    height: 21px;
    object-fit: contain;
}

.social-icon-xw {
    width: 17px;
    height: 17px;
    object-fit: contain;
}

[data-theme="dark"] .social-icon-x {
    filter: invert(1);
    width: 17px;
    height: 17px;
    object-fit: contain;
}

.footer-bottom {
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding-bottom: 0.2rem;
}

.footer-bottom p {
    margin: 0;
}

.pwa-install-section h3 {
    font-size: 0.95rem;
}

.pwa-install-btn {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
}

.pwa-install-btn-menu {
    display: none;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
    color: var(--success-color);
    font-weight: bold;
}

/* -------Back To Top------------- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.2s;
    z-index: 999;
    box-shadow: var(--shadow);
    padding: 0;
}

.back-to-top::before {
    content: "↑";
    position: absolute;
    inset: 4px;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
}

.dev-box {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dev {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1rem 0rem;
    padding-bottom: 3.5rem;
    cursor: pointer;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.dev:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border: 2px solid transparent;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        var(--accent-gradient) border-box;
}

/* ------- UTILITY CLASSES ----------- */

.hidden {
    display: none !important;
}

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.d-non {
    display: none;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block;
}

.align-center {
    align-items: center;
}

.align-flexEnd {
    align-items: flex-end;
}

.justify-item {
    justify-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-05 {
    flex: 0.5;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.flex-end {
    flex: end;
}

.gap-small {
    gap: 0.5rem;
}

.w-auto {
    width: auto;
}

.w-100 {
    width: 100%;
}

.w-50 {
    width: 50%;
}

.w-40px {
    width: 40px;
}

.w-80px {
    width: 80px;
}

.w-100px {
    width: 100px;
}

.h-auto {
    height: auto;
}

.h-100 {
    height: 122px;
}
.m-hight {
    min-height: 100px;
}

.m-hight150 {
    min-height: 150px;
}

.m-0 {
    margin: 0;
}

.m-10 {
    margin: 1rem 0;
}
.mt-1 {
    margin-top: 1rem;
}

.m-15 {
    margin-top: 1.5rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-small {
    margin-top: 0.5rem;
}

.mt-02 {
    margin-top: 0.2rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-15 {
    margin-bottom: 1.5rem;
}

.mb-small {
    margin-bottom: 0.5rem;
}

.mb-03 {
    margin-bottom: 0.3rem;
}

.mb-non {
    margin-bottom: 0 !important;
}

.ml-5px {
    margin-left: 5px;
}

.p-1 {
    padding: 1rem;
}

.p-2 {
    padding: 2rem;
}

.pt-1 {
    padding-top: 1rem;
}

.p-04 {
    padding: 0.4rem;
}

.pl-60px {
    padding-left: 60px;
}

.border {
    border: 1px solid var(--border-color);
}

.border-color {
    border-color: var(--accent-color);
}

.border-topdash {
    border-top: 1px dashed var(--border-color);
}

.cursor {
    cursor: pointer;
}

.text-pri {
    color: var(--text-primary);
}

.text-sec {
    color: var(--text-secondary);
}

.text-accent {
    color: var(--accent-color);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-italic {
    font-style: italic;
}

.font-1 {
    font-size: 1rem;
}

.font-12 {
    font-size: 1.2rem;
}

.font-15 {
    font-size: 1.5rem;
}

.font-2 {
    font-size: 2rem;
}

.font-3 {
    font-size: 3rem;
}

.font-small {
    font-size: 0.85rem;
}

.font-75 {
    font-size: 0.75rem;
}

.font-w {
    font-weight: 600;
}

.font-w800 {
    font-weight: 800;
}

.font-bold {
    font-weight: bold;
}
.font-mono {
    font-family: monospace;
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: #dc3545;
}

.list {
    list-style: none;
    padding: 0;
}

.clear-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: #dc3545;
    border-color: #dc3545
}

.position-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

.divider {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

.contact {
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem
}

.mail {
    color: var(--accent-color)
}

.mail-btn {
    text-decoration: none;
    display: inline-block;
    width: auto;
    padding: 0.4rem 1rem;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    color: inherit;
    margin-left: auto;
    padding: 0 0 0 10px;
}

.tool-share-btn {
    margin-left: auto;
    margin-right: 1rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.adsense-skyscraper {
    display: inline-block;
    width: 160px;
    height: 600px;
}

/* ------- HISTORY SECTION -------- */
.history-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.history-title {
    font-size: 1rem;
    margin: 0;
    color: var(--text-secondary);
    font-weight: 600;
}

.history-item {
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    border-left: 3px solid var(--accent-color);
}

.history-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.history-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
}

.history-result {
    font-weight: 500;
    color: var(--text-result);
    font-size: 0.9rem;
    flex: 1;
    margin-right: 10px;
}

.history-restore-btn {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.history-restore-btn:hover {
    background: var(--accent-color);
    color: white;
}

/* ------- HEX CONVERTER STYLES --------- */
.color-preview-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.result-box.clickable {
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.result-box.clickable:hover {
    background: var(--border-color);
}

.result-hint {
    color: var(--accent-color);
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.result-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    word-break: break-all;
    font-weight: 500;
    color: var(--text-primary);
}

/* --- NEW MOBILE HEADER LAYOUT --- */
.mobile-search-btn,
.mobile-search-close {
    display: none;
}

@media (max-width: 768px) {

    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0.6rem;
        position: relative;
        gap: 0;
    }

    .mobile-menu-btn {
        order: 1;
        display: flex;
        z-index: 20;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        margin: 0;
        order: 2;
        z-index: 10;
    }

    .header-right {
        order: 3;
        width: auto;
        gap: 10px;
        justify-content: flex-end;
    }

    .mobile-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 33px;
        height: 34px;
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        border-radius: 100px;
        font-size: 1rem;
        cursor: pointer;
        color: var(--text-primary);
        padding-bottom: 3px;
    }

    .search-box {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--bg-card);
        z-index: 100;
        display: none;
        align-items: center;
        padding: 0 1rem;
        border-radius: 50px;
    }

    .search-box.active {
        display: flex;
        animation: fadeIn 0.2s ease;
    }

    .search-input {
        width: 100%;
        height: 40px;
        border: none;
        background: transparent;
        padding-left: 2.5rem;
        font-size: 1rem;
    }

    #headerSearchClear {
        display: none !important;
    }

    .mobile-search-close {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-secondary);
        margin-left: 10px;
        cursor: pointer;
    }
}

@media (max-width: 768px) {

    .search-results-dropdown {
        width: 90%;
        right: auto;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 105%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        gap: 0.5rem;
        border-radius: 10px;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 1.1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .tool-icon {
        font-size: 1.6rem;
        margin-bottom: 0.4rem;
    }

    .tool-card {
        padding: 0.8rem 0.6rem;
        padding-bottom: 3rem;
    }

    .mobile-social-links {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-bottom: 0.5rem;
        gap: 1rem;
    }

    .m-follow {
        font-size: 1rem;
        margin-top: 1rem;
        margin-bottom: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .modal-content {
        margin: 1rem;
        padding: 1rem;
    }

    .modal.active {
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1rem;
    }

    .tool-share-btn {
        padding: 0.4rem 0.4rem;
    }

    .footer-section h3 {
        margin-top: 0.5rem;
    }

    .dev-box {
        display: flex;
        flex-wrap: wrap;
    }
}

/* ------- COOKIE BANNER --------- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 740px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    z-index: 10000;
    animation: slideUp 0.5s ease-out;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.cookie-content a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
}

.cookie-btn {
    padding: 0.5rem 1.5rem;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner {
        bottom: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        border-bottom: none;
    }
}

/* ------ IMAGE COMPRESSOR STYLES ------ */
.quality-shortcuts {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quality-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
    color: var(--text-primary);
}

.quality-btn:hover,
.quality-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.img-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.image-preview-container {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.preview-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.size-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--bg-card);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ------- BMI CALCULATOR STYLES -------- */
.result-header-small {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.health-tip-box {
    margin-top: 1rem;
    padding: 0.8rem;
    background: var(--bg-primary);
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/*------- word count -----------*/
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.stat-box {
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.word-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.text-box {
    min-height: 200px;
    resize: vertical;
}

.btn-tool-action {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
    font-weight: 600;
}

.btn-tool-action:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

#wc-clear {
    color: #dc3545;
    border-color: #dc3545;
}

#wc-clear:hover {
    background: #dc3545;
    color: white;
}

/* --- TEMPERATURE CONVERTER STYLES --- */
.swap-btn-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
    min-width: 40px;
}

.btn-swap {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent-color);
    transition: transform 0.3s ease, background-color 0.2s;
}

.btn-swap:hover {
    background: var(--accent-color);
    color: white;
    transform: rotate(180deg);
    border-color: var(--accent-color);
}

.formula-box {
    margin-top: 0.8rem;
    font-family: 'Courier New', monospace;
    background: var(--bg-primary);
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    border: 1px dashed var(--border-color);
    word-break: break-all;
}

.temp-fact {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--success-color);
    font-weight: 600;
    text-align: center;
}

/* ------- EMI CALCULATOR STYLES --------- */
.emi-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    gap: 1.5rem;
}

.pie-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--border-color);
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow);
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* -------- TIMER STYLES -------- */
.timer-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(var(--accent-color) 100%, var(--bg-secondary) 0);
    margin: 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: background 1s linear;
    position: relative;
}

.timer-inner {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.timer-display {
    font-size: 2.5rem;
    font-family: monospace;
    font-weight: 700;
    color: var(--text-primary);
}

.timer-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.btn-chip {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-chip:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* --------- COLOR CONVERTER STYLES --------- */
.color-preview-large {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.color-result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.color-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.copy-icon {
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 1rem;
}

.copy-icon:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* ------- COLOR PICKER STYLES ------- */
.color-picker-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.color-input-large {
    width: 80px;
    height: 80px;
    padding: 0;
    border: 4px solid var(--bg-secondary);
    border-radius: 10%;
    cursor: pointer;
    background: none;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.color-input-large:hover {
    transform: scale(1.05);
}

.palette-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 1rem 0 0.5rem;
    text-align: center;
}

.palette-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.color-chip {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.color-chip:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* --------- GRADIENT GENERATOR STYLES --------- */
.grad-box {
    height: 150px;
    border-radius: 12px;
}

.grad-color-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    align-items: center;
}

.grad-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-secondary);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.2s ease;
}

.grad-color-input {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
}

.btn-remove-color {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 5px;
}

.btn-remove-color:hover {
    color: #dc3545;
}

.grad-controls-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.preset-list {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-chip {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.btn-chip:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* -------- BOX SHADOW GENERATOR STYLES ------ */
.shadow-preview-wrapper {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background-color: #ffffff;
    transition: background-color 0.3s;
    overflow: hidden;
}

.shadow-preview-box {
    width: 100px;
    height: 100px;
    background-color: #667eea;
    border-radius: 0px;
    transition: background-color 0.3s, border-radius 0.3s;
}

.shadow-controls-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.shadow-control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shadow-control-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.shadow-color-input {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
}

/* ------- PX TO REM CONVERTER ------- */
.def-box {
    max-width: 150px;
    margin: 0 auto;
}

.converter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.conversion-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.conv-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conv-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.conv-equals {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: bold;
}

.text-preview-box {
    width: 100%;
    padding: 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    text-align: center;
    background: var(--bg-primary);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s;
}

.preview-text {
    color: var(--text-primary);
    white-space: nowrap;
    transition: font-size 0.2s ease;
    line-height: 1.2;
}

.css-snippet-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a2e;
    color: #a8a8a8;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.css-snippet-box:hover {
    border-color: var(--accent-color);
}

.code-text {
    color: #ccdcff;
}

.comment-text {
    color: #9398b3;
}

/* ------- RATIO CALCULATOR STYLES ---------- */
.ratio-preview-container {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.ratio-shape {
    background: var(--accent-gradient);
    width: 100px;
    height: 100px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 4px;
    box-shadow: var(--shadow);
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.resize-header {
    margin: 1rem 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.ratio-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    justify-content: center;
}

/* ---------- Date Calc ---------- */
.date-calc {
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

/* -------- hex to rgb ---------- */
.or {
    text-align: center;
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* --- TALLY COUNTER STYLES --- */
.tally-display {
    font-size: 6rem;
    font-weight: 800;
    text-align: center;
    color: var(--text-primary);
    margin: 1rem 0;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.tally-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-tally-main {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background-color 0.2s;
    user-select: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-tally-plus {
    background: var(--accent-gradient);
    color: white;
}

.btn-tally-plus:active {
    transform: scale(0.9);
}

.btn-tally-minus {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-tally-minus:active {
    transform: scale(0.9);
}

.tally-settings {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tally-checkbox {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* --- STOCK CALCULATOR STYLES --- */
.stock-entry-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    margin-bottom: 0.8rem;
    animation: fadeIn 0.3s ease;
}

.stock-entry-row .form-group {
    margin-bottom: 0;
    flex: 1;
}

.btn-remove-row {
    height: 38px;
    width: 38px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: #dc3545;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-remove-row:hover {
    background: #ffe6e6;
    border-color: #dc3545;
}

.pl-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.pl-positive {
    color: var(--success-color);
}

.pl-negative {
    color: #dc3545;
}

.pl-neutral {
    color: var(--text-secondary);
}

.stock-extra-section {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
}

.stock-section-title {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

.stock-section-title.green {
    color: var(--success-color);
}

.stock-helper-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.stock-result-box {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-primary);
    padding: 0.8rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-top: 1rem;
}

.text-danger {
    color: #dc3545;
}

.text-success {
    color: var(--success-color);
}

/* --- WEIGHTED INTEREST TOOL --- */
.loan-row {
    display: flex;
    gap: 0.2rem;
    align-items: flex-end;
    margin-bottom: 0.8rem;
    background: var(--bg-secondary);
    padding: 0.3rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

.loan-input-group {
    flex: 1;
}

.loan-row-title {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
    display: block;
}

.loan-row-remove {
    height: 46px;
    width: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: #dc3545;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.font-avg {
    font-size: 0.7rem;
}

.widtha {
    min-width: 100px;
}

.loan-row-remove:hover {
    background: #ffe6e6;
    border-color: #dc3545;
}

.breakdown-card {
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--accent-color);
}

.loan-total-int {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.loan-rate-group {
    display: flex;
    gap: 3px;
}

.loan-rate-type {
    width: auto;
    padding: 0.5rem 0.1rem;
    font-size: 0.9rem;
        color: var(--text-secondary);
    min-width: 40px;
    /* background: var(--bg-primary); */
}

/* ---------- CODE MINIFIER STYLES -------------- */

.privacy-note {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
    border: 1px solid var(--success-color);
}

.minifier-controls-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.minifier-paste-btn {
    height: 42px;
    width: auto;
}

.code-input-area {
    min-height: 200px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre;
    overflow-x: auto;
}

.code-output-area {
    min-height: 150px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--accent-color);
    white-space: pre-wrap;
}

.minifier-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.btn-auto-width {
    width: auto;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

.savings-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--success-color);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* --- AREA CONVERTER STYLES --- */
.unit-insight {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: var(--bg-primary);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    border: 1px solid var(--border-color);
}

.swap-btn-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
    min-width: 40px;
}

.btn-swap {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent-color);
    transition: transform 0.3s ease, background-color 0.2s;
}

.btn-swap:hover {
    background: var(--accent-color);
    color: white;
    transform: rotate(180deg);
    border-color: var(--accent-color);
}

/* --- IMAGE CONVERTER STYLES --- */
.converter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.format-option {
    transition: opacity 0.3s;
}

.format-option.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.btn-download-result {
    display: block;
    text-align: center;
    margin-top: 1rem;
    text-decoration: none;
}

.imgbg {
    height: 42px;
    padding: 2px;
}

/* --- IMAGE RESIZER STYLES --- */
.resizer-controls {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.preset-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.btn-chip.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.unit-group {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.dpi-badge {
    font-size: 0.75rem;
    background: var(--bg-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin-left: auto;
}

.btn-lock {
    padding: 0.5rem;
    font-size: 1.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.btn-lock.locked {
    color: var(--accent-color);
}

.resizer-preview-box {
    max-width: 100%;
    overflow: hidden;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee),
        linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.privacy-note {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
    border: 1px solid var(--success-color);
}

/* --------- BASE64 TOOL STYLES ----------- */
.base64-textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--accent-color);
    white-space: pre-wrap;
    word-break: break-all;
    height: 150px;
    background: var(--bg-primary);
}

.snippet-group {
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.8rem;
}

.snippet-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 0.4rem;
    display: block;
    text-transform: uppercase;
}

.snippet-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.snippet-text {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-primary);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-right: 10px;
}

/* ------------ IMAGE CROPPER STYLES ---------- */
.cropper-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    user-select: none;
}

.crop-viewport {
    border: 2px dashed var(--accent-color);
    background-color: #333;
    background-image:
        linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444),
        linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    overflow: hidden;
    cursor: grab;
    box-shadow: var(--shadow);
    max-width: 100%;
    touch-action: none;
}

.crop-viewport:active {
    cursor: grabbing;
}

.crop-viewport.circle-mask {
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.crop-controls {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}


/* --- LIST CLEANER STYLES --- */
.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.list-modifier-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.input-mini {
    padding: 0.4rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 100%;
    max-width: 120px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.list-stats-bar {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 600;
}

.stat-highlight {
    color: var(--accent-color);
}

/* --- RANDOM PICKER STYLES --- */
.random-winner-box {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 2px dashed var(--accent-color);
    margin-top: 1.5rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.winner-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1.2;
    transition: transform 0.1s;
}

.winner-text.rolling {
    color: var(--text-secondary);
    opacity: 0.7;
    transform: scale(0.95);
}

.winner-sub {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mode-btn-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* --- 3D COIN STYLES --- */
.coin-container {
    width: 100px;
    height: 100px;
    margin: 2rem auto;
    perspective: 1000px;
}

.coin-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 3s ease-out;
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    border: 4px solid #b8860b;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.coin-front {
    background: radial-gradient(circle, #ffd700, #daa520);
    color: #b8860b;
    transform: rotateY(0deg);
}

.coin-back {
    background: radial-gradient(circle, #c0c0c0, #a9a9a9);
    color: #696969;
    transform: rotateY(180deg);
}

/* --- 3D DICE STYLES --- */
.dice-container {
    width: 80px;
    height: 80px;
    margin: 2rem auto;
    perspective: 1000px;
}

.dice-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.dice-face {
    position: absolute;
    width: 80px;
    height: 80px;
    background: white;
    border: 2px solid #ccc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: black;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.face-1 {
    transform: rotateY(0deg) translateZ(40px);
}

.face-2 {
    transform: rotateY(90deg) translateZ(40px);
}

.face-3 {
    transform: rotateY(180deg) translateZ(40px);
}

.face-4 {
    transform: rotateY(-90deg) translateZ(40px);
}

.face-5 {
    transform: rotateX(90deg) translateZ(40px);
}

.face-6 {
    transform: rotateX(-90deg) translateZ(40px);
}


/* --- REACTION TEST STYLES --- */
.reaction-viewport {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s;
    box-shadow: var(--shadow);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.reaction-idle {
    background-color: var(--accent-color);
}

.reaction-waiting {
    background-color: #dc3545;
}

.reaction-go {
    background-color: #28a745;
}

.reaction-result {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.reaction-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.reaction-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.reaction-sub {
    font-size: 1rem;
    opacity: 0.9;
}

.reaction-stats {
    display: flex;
    justify-content: space-around;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-highlight {
    color: var(--accent-color);
    font-weight: bold;
}


/* --- ROCK PAPER SCISSORS STYLES --- */
.rps-arena {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 2rem 0;
    position: relative;
}

.rps-hand {
    font-size: 5rem;
    transition: transform 0.2s;
    user-select: none;
}

.hight-30px {
    height: 30px;
}

#rpsPlayerHand {
    transform: scaleX(1);
}

#rpsCpuHand {
    transform: scaleX(-1);
}

.rps-hand.shaking {
    animation: handShake 1.5s ease-in-out;
}

@keyframes handShake {
    0% {
        transform: translateY(0px) scaleX(1);
    }

    15% {
        transform: translateY(-30px) rotate(-10deg) scaleX(1);
    }

    30% {
        transform: translateY(0px) rotate(0deg) scaleX(1);
    }

    45% {
        transform: translateY(-30px) rotate(-10deg) scaleX(1);
    }

    60% {
        transform: translateY(0px) rotate(0deg) scaleX(1);
    }

    75% {
        transform: translateY(-30px) rotate(-10deg) scaleX(1);
    }

    100% {
        transform: translateY(0px) scaleX(1);
    }
}

#rpsCpuHand.shaking {
    animation: handShakeCpu 1.5s ease-in-out;
}

@keyframes handShakeCpu {
    0% {
        transform: translateY(0px) scaleX(-1);
    }

    15% {
        transform: translateY(-30px) rotate(-10deg) scaleX(-1);
    }

    30% {
        transform: translateY(0px) rotate(0deg) scaleX(-1);
    }

    100% {
        transform: translateY(0px) scaleX(-1);
    }
}

.rps-scoreboard {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 8px;
}

.score-badge {
    color: var(--accent-color);
}

.rps-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-rps {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-rps:hover {
    background: var(--accent-color);
    transform: scale(1.1);
    border-color: var(--accent-color);
}

/* --- MEMORY GAME STYLES --- */
.memory-stats {
    display: flex;
    justify-content: space-around;
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.memory-grid {
    display: grid;
    gap: 0.5rem;
    margin: 0 auto;
    perspective: 1000px;
    max-width: 400px;
}

.memory-grid.easy {
    grid-template-columns: repeat(4, 1fr);
}

.memory-grid.hard {
    grid-template-columns: repeat(6, 1fr);
    max-width: 500px;
}

.memory-card {
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.memory-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.memory-card.flipped .memory-inner {
    transform: rotateY(180deg);
}

.memory-front,
.memory-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.memory-back {
    background: var(--accent-gradient);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid white;
}

.memory-front {
    background: white;
    transform: rotateY(180deg);
    border: 2px solid var(--accent-color);
}

.memory-card.matched .memory-front {
    background: #d4edda;
    border-color: #28a745;
    animation: popMatch 0.4s ease-out;
}

.memory-card.shaking {
    animation: shakeErr 0.5s;
}

@keyframes popMatch {
    0% {
        transform: rotateY(180deg) scale(1);
    }

    50% {
        transform: rotateY(180deg) scale(1.1);
    }

    100% {
        transform: rotateY(180deg) scale(1);
    }
}

@keyframes shakeErr {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}


/* --- MATH QUIZ STYLES --- */
.math-question {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.math-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-math-option {
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: 0 4px 0 var(--border-color);
}

.btn-math-option:active {
    transform: translateY(4px);
    box-shadow: none;
}

.btn-math-option.correct {
    background-color: #28a745;
    color: white;
    border-color: #218838;
    box-shadow: 0 4px 0 #1e7e34;
}

.btn-math-option.wrong {
    background-color: #dc3545;
    color: white;
    border-color: #c82333;
    box-shadow: 0 4px 0 #bd2130;
    animation: shakeErr 0.4s;
}

.math-timer-track {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.math-timer-fill {
    height: 100%;
    background: var(--accent-gradient);
    width: 100%;
    transition: width 1s linear;
}

.math-hud {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.combo-text {
    color: #ffc107;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.combo-text.active {
    opacity: 1;
    transform: scale(1.2);
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* --- PERIODIC TABLE STYLES --- */
.periodic-container {
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
}

.periodic-grid {
    display: grid;
    grid-template-columns: repeat(18, 60px);
    gap: 4px;
    width: max-content;
}

.element-card {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    position: relative;
}

.element-card:hover {
    transform: scale(1.2);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.elem-num {
    font-size: 0.6rem;
    position: absolute;
    top: 2px;
    left: 4px;
    opacity: 0.7;
}

.elem-sym {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.elem-name-tiny {
    font-size: 0.5rem;
    display: none;
}

.cat-gas {
    border-bottom: 4px solid #ff6b6b;
}

.cat-metal {
    border-bottom: 4px solid #4ecdc4;
}

.cat-noble {
    border-bottom: 4px solid #a29bfe;
}

.cat-other {
    border-bottom: 4px solid #ffe66d;
}

.element-empty {
    visibility: hidden;
    pointer-events: none;
}

.atom-display {
    width: 150px;
    height: 150px;
    position: relative;
    margin: 0 auto 1rem;
    perspective: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atom-nucleus {
    width: 30px;
    height: 30px;
    background: var(--accent-gradient);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-color);
    position: absolute;
    z-index: 10;
}

.atom-orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    transform-style: preserve-3d;
}

.atom-orbit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    width: 8px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 50%;
    box-shadow: 0 0 5px white;
}

.orbit-1 {
    animation: spinAtom 2s linear infinite;
}

.orbit-2 {
    animation: spinAtom 3s linear infinite;
    transform: rotateY(60deg);
}

.orbit-3 {
    animation: spinAtom 4s linear infinite;
    transform: rotateY(-60deg);
}

@keyframes spinAtom {
    0% {
        transform: rotateZ(0deg) rotateX(65deg);
    }

    100% {
        transform: rotateZ(360deg) rotateX(65deg);
    }
}

.element-detail-box {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

.detail-sym {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.detail-cat {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

/* --- MORSE CODE STYLES --- */
.morse-light-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.morse-bulb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #333;
    border: 4px solid #555;
    box-shadow: inset 0 0 10px black;
    transition: background-color 0.05s, box-shadow 0.05s;
}

.morse-bulb.active {
    background: #ffeb3b;
    box-shadow: 0 0 40px #ffeb3b, inset 0 0 10px white;
    border-color: #fbc02d;
}

.morse-code-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--accent-color);
    font-weight: bold;
    margin-top: 1rem;
    word-break: break-all;
}


/* --- TYPING TEST STYLES --- */
.typing-container {
    position: relative;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    line-height: 1.6;
}

.typing-display {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    min-height: 120px;
    cursor: text;
    user-select: none;
    white-space: pre-wrap;
    word-break: break-word;
}

.char {
    color: var(--text-secondary);
    opacity: 0.7;
}

.char.correct {
    color: var(--success-color);
    opacity: 1;
    font-weight: bold;
}

.char.incorrect {
    color: #dc3545;
    background: #ffe6e6;
    text-decoration: underline;
}

.char.current {
    border-bottom: 2px solid var(--accent-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: default;
    z-index: 10;
}

.typing-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.stat-big {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
}

.stat-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- DISCOUNT CALCULATOR STYLES --- */
.bill-item-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.bill-summary-bar {
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.receipt-box {
    background: #fff;
    color: #333;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-top: 1.5rem;
    font-family: 'Courier New', monospace;
    position: relative;
}

[data-theme="dark"] .receipt-box {
    background: #e0e0e0;
    color: #000;
}

.receipt-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.receipt-line.total {
    border-top: 2px dashed #999;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-weight: 800;
    font-size: 1.1rem;
}

.receipt-divider {
    border-bottom: 1px dashed #bbb;
    margin: 0.5rem 0;
}


/* --- FUEL CALCULATOR --- */
.fuel-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.fuel-card {
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.fuel-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    display: block;
}

.fuel-val {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.fuel-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.fuel-card.main {
    border-color: var(--accent-color);
    background: rgba(102, 126, 234, 0.05);
}

.fuel-card.main .fuel-val {
    color: var(--accent-color);
    font-size: 1.3rem;
}


/* --------- TIP & SPLIT STYLES -------- */
.balance-tracker {
    background: var(--bg-primary);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
}

.balance-tracker.balanced {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.balance-tracker.unbalanced {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #dc3545;
}

.split-person-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.2s ease;
}

.person-name-input {
    flex: 1;
    min-width: 80px;
    font-size: 0.9rem;
}

.person-amount-input {
    width: 100px;
    text-align: right;
    font-weight: bold;
}

.person-amount-input.locked {
    background: #e9ecef;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-icon-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-icon-action:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-icon-action.is-locked {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(102, 126, 234, 0.1);
}

.btn-icon-action.remove:hover {
    color: #dc3545;
    border-color: #dc3545;
}


/* ------ SLEEP CYCLE CALCULATOR ------- */
.sleep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.sleep-card {
    background: var(--bg-secondary);
    padding: 1rem 0.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: transform 0.2s;
    cursor: pointer;
}

.sleep-card:hover {
    transform: translateY(-3px);
}

.sleep-time-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.3rem;
}

.sleep-cycles-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.sleep-best {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.sleep-best .sleep-cycles-text {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.sleep-good {
    border-color: #17a2b8;
    background: rgba(23, 162, 184, 0.05);
}

.sleep-good .sleep-cycles-text {
    color: #17a2b8;
    background: rgba(23, 162, 184, 0.1);
}

.sleep-meh {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.sleep-meh .sleep-cycles-text {
    color: #d39e00;
    background: rgba(255, 193, 7, 0.1);
}

/* --- SLEEP CALCULATOR SPECIFIC STYLES --- */
.sleep-science-content {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.sleep-legend-box {
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
}

.sleep-legend-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sleep-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.bg-green {
    background-color: #28a745;
}

.bg-yellow {
    background-color: #ffc107;
}

/* --- CALORIE CALCULATOR STYLES --- */
.food-equivalent-box {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    border: 2px dashed var(--border-color);
}

.food-icon-large {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
    animation: popIn 0.4s ease;
}

.food-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.food-highlight {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
}


/* --- HEART RATE ZONES STYLES --- */
.hr-result-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
}

.hr-max-display {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    display: block;
    line-height: 1.2;
}

.hr-zone-card {
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border-left: 6px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.hr-zone-title {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.hr-zone-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.zone-1 {
    border-color: #a0aec0;
}

.zone-2 {
    border-color: #4299e1;
}

.zone-3 {
    border-color: #48bb78;
}

.zone-4 {
    border-color: #ed8936;
}

.zone-5 {
    border-color: #f56565;
}

/* --- DIABETES TOOL STYLES --- */
.sugar-meter-track {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.sugar-meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease, background-color 0.5s ease;
    border-radius: 6px;
}

.sugar-normal {
    background-color: #28a745;
    color: #28a745;
}

.sugar-pre {
    background-color: #ffc107;
    color: #d39e00;
}

.sugar-high {
    background-color: #dc3545;
    color: #dc3545;
}

.diabetes-result-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.diabetes-status-text {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
}

.diabetes-value-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.diabetes-fact-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: left;
    color: var(--text-primary);
}


/* --- PREGNANCY CALCULATOR STYLES --- */
.baby-size-card {
    background: linear-gradient(135deg, #fff0f6 0%, #fff5f7 100%);
    border: 2px solid #fcc2d7;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 135, 135, 0.15);
}

.baby-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 0.5rem;
    animation: floatBaby 3s ease-in-out infinite;
}

.baby-text-main {
    font-size: 1.2rem;
    font-weight: 700;
    color: #d6336c;
}

.baby-text-sub {
    font-size: 0.9rem;
    color: #862e9c;
}

@keyframes floatBaby {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.timeline-box {
    border-left: 3px solid #e9ecef;
    padding-left: 1rem;
    margin-top: 1rem;
}

.milestone-item {
    margin-bottom: 1rem;
    position: relative;
}

.milestone-item::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    position: absolute;
    left: -1.35rem;
    top: 5px;
}

.milestone-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}


/* --- TDEE & MACRO STYLES --- */
.macro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.macro-card {
    background: var(--bg-secondary);
    padding: 0.8rem 0.5rem;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.macro-protein {
    border-color: #28a745;
}

.macro-carbs {
    border-color: #667eea;
}

.macro-fats {
    border-color: #ffc107;
}

.macro-val {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
    display: block;
}

.macro-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tdee-highlight {
    font-size: 2rem;
    color: var(--accent-color);
    font-weight: 800;
    text-align: center;
    margin: 1rem 0;
    display: block;
}

.fact-box {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f8ff;
    border-left: 5px solid #0dcaf0;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}

.fact-title {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #0056b3;
}


/* --- TEXT TO SPEECH STYLES --- */
.tts-controls {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.voice-select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tts-slider-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.tts-slider-label {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 60px;
}

.speaking-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--success-color);
    border-radius: 50%;
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.speaking-indicator.active {
    opacity: 1;
    animation: pulseSpeak 1s infinite;
}

@keyframes pulseSpeak {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- TEXT ANALYZER STYLES --- */
.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.keyword-chip {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.keyword-count {
    background: var(--accent-color);
    color: white;
    padding: 0 5px;
    border-radius: 10px;
    margin-left: 5px;
    font-size: 0.7rem;
}

.sentiment-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    margin-top: 0.5rem;
    overflow: hidden;
    display: flex;
}

.sentiment-pos {
    background: #28a745;
    height: 100%;
    transition: width 0.3s;
}

.sentiment-neg {
    background: #dc3545;
    height: 100%;
    transition: width 0.3s;
}

/* --- UNIT PRICE CALCULATOR --- */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.compare-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    transition: all 0.3s;
}

.compare-card.winner {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
}

.compare-card.winner::before {
    content: "🏆 Best Deal";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: bold;
}

.compare-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

@media (max-width: 600px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .compare-vs {
        display: none;
    }

}

/* --- PASSWORD STRENGTH STYLES --- */
.strength-meter-bg {
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    margin: 1rem 0 0.5rem;
    overflow: hidden;
}

.strength-meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
}

.strength-weak {
    background-color: #dc3545;
}

.strength-medium {
    background-color: #ffc107;
}

.strength-strong {
    background-color: #28a745;
}

.strength-secure {
    background-color: #007bff;
}

.crack-time-box {
    text-align: center;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.password-feedback-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.feedback-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-item.met {
    color: var(--success-color);
    text-decoration: line-through;
    opacity: 0.6;
}

.input-wrapper {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
}

.input-icon-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    z-index: 5;
}

/* --- UUID GENERATOR STYLES --- */
.uuid-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.uuid-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.uuid-row:hover {
    border-color: var(--accent-color);
    background: var(--bg-card);
}

/* --- DEVICE INFO STYLES --- */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.device-card {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.device-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
}

.device-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.device-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.2rem;
}

.device-value {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-primary);
    word-break: break-word;
}

.device-raw-box {
    background: #1a1a2e;
    color: #a8a8a8;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

/* --- DENSITY CALCULATOR STYLES --- */
.density-tank {
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, #d4fcff 0%, #a2d9ff 100%);
    border: 2px solid #4299e1;
    border-top: none;
    border-radius: 0 0 8px 8px;
    position: relative;
    margin-top: 1rem;
    overflow: hidden;
}

.density-water-line {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px dashed #2b6cb0;
}

.density-object {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    border: 2px solid #fff;
    border-radius: 8px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: top 1s cubic-bezier(0.5, 0, 0.5, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.object-float {
    top: 10px;
}

.object-sink {
    top: 95px;
}

.density-fact {
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

/* --- GST CALCULATOR STYLES --- */
.tax-slab-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn-slab {
    flex: 1;
    min-width: 60px;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
}

.btn-slab:hover {
    border-color: var(--accent-color);
}

.btn-slab.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.gst-breakdown-table {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
}

.gst-breakdown-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.gst-row-label {
    color: var(--text-secondary);
}

.gst-row-val {
    text-align: right;
    font-weight: 700;
    color: var(--text-primary);
}

/* --- COMPOUND INTEREST STYLES --- */
.interest-graph-container {
    height: 30px;
    background: var(--bg-secondary);
    border-radius: 15px;
    overflow: hidden;
    margin: 1rem 0;
    display: flex;
    position: relative;
    border: 1px solid var(--border-color);
}

.graph-principal {
    background: var(--accent-color);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    transition: width 0.5s ease;
}

.graph-interest {
    background: var(--success-color);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    transition: width 0.5s ease;
}

.definitions-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.def-title {
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
    display: block;
}

.def-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}


/* --- INVOICE GENERATOR STYLES --- */
.invoice-header-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.invoice-item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.invoice-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.live-total-badge {
    font-weight: 800;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.text-secondary {
    color: var(--text-secondary);
}

.m-0 {
    margin: 0 !important;
}

.font-bold {
    font-weight: bold;
}

.mb-xs {
    margin-bottom: 0.3rem;
}

@media (max-width: 600px) {
    .invoice-item-row {
        grid-template-columns: 1fr 1fr;
        background: var(--bg-secondary);
        padding: 0.5rem;
        border-radius: 8px;
    }

    .invoice-name-input {
        grid-column: span 2;
    }
}

@media print {
    body,
        html {
            background: white !important;
            height: auto !important;
            min-height: 0 !important;
            overflow: visible !important;
            display: block !important;
        }
    
        header,
        footer,
        .hero,
        .category-tabs,
        .tools-grid,
        .content-section,
        .back-to-top,
        .cookie-banner,
        .modal-header,
        .form-group,
        .form-row,
        .ad-sidebar,
        button,
        hr {
            display: none !important;
        }
    
        #toolModal,
        .modal,
        .modal-content,
        #toolInterface {
            display: block !important;
            position: static !important;
            width: 100% !important;
            height: auto !important;
            background: white !important;
            box-shadow: none !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: visible !important;
        }
    #invoiceResult,
    #invoiceResult * {
        visibility: visible;
    }

    #invoiceResult {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
    }

    .no-print {
        display: none !important;
    }
}


/* --- QUICK LIST MAKER STYLES --- */
.list-maker-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.list-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.2s ease;
}

.list-item-text {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.list-item-qty {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.quick-add-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    scrollbar-width: none;
}

.quick-add-scroll::-webkit-scrollbar {
    display: none;
}

.btn-quick-add {
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-quick-add:active {
    transform: scale(0.95);
    background: var(--bg-secondary);
}

.quick-add-scroll {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.list-qty-input {
    width: 70px !important;
    margin-left: 5px;
    border-left: 1px solid var(--border-color);
    text-align: center;
}

.list-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.list-item-text {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    word-break: break-word;
}

.list-item-qty-badge {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
    font-weight: 600;
}

.btn-list-delete {
    height: 28px;
    width: 28px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
}

.btn-list-delete:hover {
    background: #ffe6e6;
    border-radius: 50%;
}

/* --- LOAN PREPAYMENT STYLES --- */
.savings-box {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1rem;
    color: #155724;
}

.savings-amount {
    font-size: 1.8rem;
    font-weight: 800;
    display: block;
    margin-top: 0.2rem;
}

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.compare-col {
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.compare-col.new {
    border-color: var(--success-color);
    background: rgba(40, 167, 69, 0.05);
}

#elecItemsContainer .invoice-item-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#elecItemsContainer .elec-preset {
    flex: 2;
    min-width: 120px;
}

#elecItemsContainer .elec-watts {
    flex: 1;
    min-width: 70px;
}

#elecItemsContainer .elec-hours {
    flex: 1;
    min-width: 60px;
}

#elecItemsContainer .elec-qty {
    flex: 0.5;
    min-width: 50px;
}

/* --- SIP VS LUMPSUM STYLES --- */
.race-chart-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.race-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.race-label {
    width: 60px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.race-track {
    flex: 1;
    background: #e0e0e0;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.race-fill {
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.fill-sip {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.fill-lump {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}

.winner-badge {
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    color: #b8860b;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* --- NOTEPAD / STICKY NOTES STYLES --- */
.notepad-wrapper {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: background-color 0.3s;
}

.note-bg-yellow {
    background-color: #fff9c4;
    color: #333;
}

.note-bg-blue {
    background-color: #e3f2fd;
    color: #333;
}

.note-bg-green {
    background-color: #e8f5e9;
    color: #333;
}

.note-bg-pink {
    background-color: #fce4ec;
    color: #333;
}

.note-bg-white {
    background-color: #ffffff;
    color: #333;
}

.notepad-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.3);
}

.note-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: inherit;
    resize: vertical;
}

.note-textarea:focus {
    outline: none;
}

.note-canvas {
    display: block;
    width: 100%;
    height: 300px;
    cursor: crosshair;
    touch-action: none;
}

.color-swatch-group {
    display: flex;
    gap: 5px;
}

.color-swatch-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
}

.color-swatch-btn:hover {
    transform: scale(1.2);
}

.yellow {
    background: #fff9c4;
}

.blue {
    background: #e3f2fd;
}

.greenn {
    background: #e8f5e9;
}

.pink {
    background: #fce4ec;
}

.white {
    background: #ffffff;
}
/* --- PERCENTAGE CHANGE STYLES --- */
.perc-indicator-box {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 2px solid transparent;
}

.perc-arrow {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.perc-up {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.perc-down {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.perc-neutral {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

/* --- QUICK SETTLE TOOL --- */
.trans-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg-card);
    padding: 0.4rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.2s ease;
}

.trans-desc {
    flex: 2;
    min-width: 0;
}

.trans-amt {
    flex: 1;
    min-width: 80px;
    text-align: right;
    font-weight: bold;
}

.btn-toggle-sign {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    font-weight: 900;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sign-plus {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}
.sign-minus {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

/* --- Gold Tool Specific CSS --- */
.gold-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gold-info-list li {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.gold-icon {
    background-color: var(--bg-secondary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    margin-top: 2px;
}

.gold-disclaimer-box {
    background-color: rgba(239, 68, 68, 0.1);
    /* Light red tint */
    border-left: 4px solid var(--danger);
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.gold-result-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.gold-result-row:last-child {
    border-bottom: none;
}

.gold-divider {
    height: 2px;
    background-color: var(--text-primary);
    margin: 0.75rem 0;
    width: 100%;
}

.content-sectionn {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.content-sectionn h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.content-sectionn p {
    margin-bottom: 1rem;
}

/* --- DEBUG: FAKE ADS --- */
/* .ad-sidebar {
    min-width: 160px;
    height: 600px;

    background-color: #e9ecef;
    border: 2px dashed #adb5bd;

    display: flex;
    align-items: center;
    justify-content: center;

    position: sticky;
    top: 2rem;
    margin-top: 4rem;
}

@media (min-width: 1100px) {
    .ad-sidebar {
        display: flex !important;
    }
} */

