/* CSS Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f5f0ff 0%, #ede8f7 50%, #f0ebfa 100%);
    color: #262233;
    min-height: 100vh;
    line-height: 1.6;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: #a123ff;
    color: #fff;
}

.container {
    width: min(1400px, 96%);
    margin: 0 auto;
}

.topbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(32, 20, 58, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.brand {
    text-decoration: none;
    color: #4d3d7c;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #9b3cff, #4f46e5);
}

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

.nav-links a {
    text-decoration: none;
    color: #4d3d7c;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* Default Mantras Highlight Button */
.nav-btn-highlight {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%) !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transition: all 0.25s ease !important;
}

.nav-btn-highlight:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Navigation Dropdown Menu */
.nav-menu-dropdown {
    position: relative;
}

.nav-menu-dropdown summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 12px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    font-weight: 600;
    color: #4d3d7c;
    transition: all 0.2s ease;
}

.nav-menu-dropdown summary:hover {
    background: rgba(139, 92, 246, 0.2);
}

.nav-menu-dropdown[open] summary {
    background: rgba(139, 92, 246, 0.25);
}

.nav-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 10px;
    min-width: 200px;
    z-index: 100;
    border: 1px solid #e9e2ff;
}

.nav-dropdown-content a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
}

.nav-dropdown-content a:hover {
    background: #f5f3ff;
}

.right-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-form select {
    border-radius: 10px;
    border: 1px solid #d8cef7;
    padding: 7px 10px;
    background: #fff;
}

.profile-menu {
    position: relative;
}

.profile-menu summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(90deg, #a123ff, #4f46e5);
    font-weight: 700;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 42px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(30, 18, 60, 0.18);
    min-width: 170px;
    padding: 8px;
    display: grid;
    gap: 4px;
}

.profile-dropdown a {
    text-decoration: none;
    color: #3d2f6f;
    padding: 8px;
    border-radius: 8px;
}

.profile-dropdown a:hover {
    background: #f4efff;
}

.main-content {
    padding: 18px 0 40px;
}

.full-width {
    width: 100%;
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow:
        0 4px 6px rgba(41, 27, 66, 0.02),
        0 10px 30px rgba(41, 27, 66, 0.06);
    margin-bottom: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(139, 92, 246, 0.08);
}

.card:hover {
    box-shadow:
        0 6px 12px rgba(41, 27, 66, 0.04),
        0 14px 40px rgba(41, 27, 66, 0.1);
}

/* Card title styling */
.card h2 {
    color: #4c1d95;
    font-size: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #a123ff, #4f46e5);
    border-radius: 2px;
}

.counter-wrap .counter-head {
    background: linear-gradient(135deg, #a123ff 0%, #7c3aed 50%, #4f46e5 100%);
    color: #fff;
    border-radius: 18px 18px 0 0;
    text-align: center;
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.counter-wrap .counter-head::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0.5;
}

.counter-wrap .counter-head h1 {
    margin: 0 0 5px;
    font-size: 28px;
}

.hero {
    border-radius: 20px;
    margin-bottom: 12px;
}

.controls-row {
    display: flex;
    align-items: end;
    gap: 12px;
    margin-bottom: 12px;
}

/* Progress bar styles */
.progress-wrap {
    margin-bottom: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9e2ff;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a123ff, #4f46e5);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(161, 35, 255, 0.3);
}

.progress-text {
    color: #6a4ca5;
    font-weight: 600;
    font-size: 12px;
    display: block;
    text-align: right;
}

/* Celebration animation */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.celebration-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: celebrate 1s ease-out forwards;
}

@keyframes celebrate {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
}

/* Floating OM symbols background */
.floating-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-om {
    position: absolute;
    font-size: 48px;
    opacity: 0.03;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

.controls-row label {
    flex: 1;
}

.btn-light {
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    background: #e7ddff;
    color: #452e78;
    font-weight: 700;
    cursor: pointer;
}

#timerLabel {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 10px;
}

.counter-side {
    width: 84px;
    background: linear-gradient(135deg, #f5f0ff 0%, #f2ebff 100%);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    border: 1px solid rgba(161, 35, 255, 0.1);
    box-shadow: 0 2px 8px rgba(161, 35, 255, 0.08);
}

.counter-side small {
    color: #7a699e;
    text-transform: uppercase;
    font-size: 11px;
}

.counter-side strong {
    display: block;
    font-size: 30px;
    color: #3f2f74;
}

.main-count {
    width: 170px;
    height: 170px;
    border: 8px solid #6a35df;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 56px;
    font-weight: 700;
    color: #5b27d8;
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(106, 53, 223, 0.1),
        0 10px 40px rgba(106, 53, 223, 0.2),
        inset 0 4px 20px rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.main-count::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 20%;
    width: 25%;
    height: 15%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, transparent 100%);
    border-radius: 50%;
    opacity: 0.6;
}

.main-count.pulse {
    animation: counterPulse 0.3s ease;
}

@keyframes counterPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 30px rgba(161, 35, 255, 0.4);
    }

    100% {
        transform: scale(1);
    }
}

.mantra-line {
    text-align: center;
    font-size: 24px;
    margin: 16px 0 20px;
    color: #4c1d95;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.4;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(161, 35, 255, 0.05) 0%, rgba(79, 70, 229, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-jap {
    width: 100%;
    border: 0;
    border-radius: 18px;
    padding: 20px;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #a123ff 0%, #7c3aed 50%, #4f46e5 100%);
    box-shadow:
        0 4px 15px rgba(161, 35, 255, 0.3),
        0 8px 30px rgba(79, 70, 229, 0.2);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-jap::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-jap:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(161, 35, 255, 0.4),
        0 12px 40px rgba(79, 70, 229, 0.3);
}

.btn-jap:hover::before {
    left: 100%;
}

.btn-jap:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(161, 35, 255, 0.3);
}

.btn-jap::after {
    content: 'ॐ';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    opacity: 0.3;
}

.btn-secondary,
.btn-primary {
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    cursor: pointer;
    font-weight: 700;
}

.btn-secondary {
    margin-top: 12px;
    width: 100%;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
    color: #92400e;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #f59e0b;
    padding: 14px 20px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 50%, #fbbf24 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
    border-color: #fbbf24;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.btn-secondary::after {
    content: '✓';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.5;
}

.btn-primary {
    background: #5b2bd4;
    color: #fff;
}

.form-grid {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 2px solid #e9e4f5;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    background: #fff;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #a123ff;
    box-shadow: 0 0 0 4px rgba(161, 35, 255, 0.1);
}

input:hover,
select:hover,
textarea:hover {
    border-color: #c4b5e0;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a4ca5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

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

.cards-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    background: linear-gradient(135deg, #fff 0%, #faf8ff 100%);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.stat-card h3 {
    margin: 0 0 8px;
    color: #6a4ca5;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card p {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #a123ff, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.settings-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 500;
    color: #4d3d7c;
}

.settings-grid input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.test-sound-wrap {
    display: flex;
    align-items: flex-end;
}

.test-sound-wrap button {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
}

.mantra-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.mantra-card-item {
    text-align: left;
    border: 1px solid #e8ddff;
    background: linear-gradient(135deg, #faf7ff 0%, #f5f0ff 100%);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mantra-card-item::before {
    content: 'ॐ';
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 48px;
    opacity: 0.06;
    pointer-events: none;
}

.mantra-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(84, 52, 166, 0.14);
}

.mantra-card-item h3 {
    margin: 0 0 10px;
    color: #4a2f81;
}

.mantra-card-item p {
    margin: 0 0 6px;
    color: #4c3f72;
}

.mantra-card-item p span {
    font-weight: 700;
}

.start-dialog {
    border: 0;
    border-radius: 14px;
    padding: 0;
    width: min(420px, 92%);
}

.start-dialog::backdrop {
    background: rgba(28, 18, 50, 0.45);
}

.dialog-content {
    padding: 18px;
}

.dialog-content h3 {
    margin-top: 0;
    color: #392b61;
}

.dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #eee6ff;
}

.list-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #eee6ff;
    padding: 10px 0;
}

.danger-link {
    color: #b73a3a;
    text-decoration: none;
    font-weight: 700;
}

/* Mantra card grid styles */
.mantra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.mantra-item-card {
    background: linear-gradient(135deg, #fff 0%, #f9f7ff 100%);
    border: 1px solid #e9e2ff;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.08);
}

.mantra-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(107, 70, 193, 0.15);
    border-color: #d4c4ff;
}

.mantra-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mantra-card-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f0ebff 0%, #e9e2ff 100%);
    border-radius: 12px;
}

.mantra-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #4c1d95;
    font-weight: 700;
}

.mantra-card-text {
    color: #6b5b8c;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
    font-style: italic;
}

.mantra-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #eee6ff;
}

.mantra-card-footer small {
    color: #9ca3af;
    font-size: 12px;
}

.btn-delete {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.2);
}

@media (max-width: 640px) {
    .mantra-grid {
        grid-template-columns: 1fr;
    }
}

/* Default Mantras Page Styles */
html {
    scroll-behavior: smooth;
}

.category-section {
    margin-bottom: 20px;
    scroll-margin-top: 80px;
}

.chanting-guide,
.disease-section {
    scroll-margin-top: 80px;
}

.category-title {
    color: #4c1d95;
    font-size: 22px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9e2ff;
}

.mantra-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.mantra-detail-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e9e2ff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.08);
}

.mantra-detail-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(107, 70, 193, 0.15);
    border-color: var(--card-color, #8B5CF6);
}

.mantra-detail-card .card-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #f0ebff;
}

.card-icon {
    font-size: 36px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.card-title-wrap h3 {
    margin: 0 0 4px 0;
    font-size: 17px;
    color: #4c1d95;
    font-weight: 700;
}

.mantra-text-preview {
    color: #8b7bb0;
    font-size: 12px;
}

.mantra-detail-card .card-body {
    padding: 16px 20px;
    flex-grow: 1;
}

.mantra-full-text {
    font-size: 18px;
    color: #4c1d95;
    font-weight: 600;
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #f9f7ff 0%, #f0ebff 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    line-height: 1.8;
}

.detail-section {
    margin-bottom: 14px;
}

.detail-section strong {
    color: #6b4ca5;
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
}

.detail-section p {
    color: #5a4a7c;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.detail-section ul {
    margin: 0;
    padding-left: 18px;
}

.detail-section li {
    color: #5a4a7c;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 4px;
}

.chanting-info {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 3px solid #eab308;
}

.chanting-info strong {
    color: #854d0e;
}

.chanting-info p {
    color: #713f12;
}

.mantra-detail-card .card-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0ebff;
    background: #faf8ff;
}

.add-mantra-form {
    margin: 0;
}

.btn-add-mantra {
    width: 100%;
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-mantra:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.btn-add-mantra span {
    font-size: 16px;
}

/* Quick Navigation Grid */
.quick-nav-card {
    background: linear-gradient(135deg, #f9f7ff 0%, #f0ebff 100%);
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.quick-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: #4c1d95;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.25s ease;
    border: 1px solid #e9e2ff;
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.06);
}

.quick-nav-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(107, 70, 193, 0.12);
    border-color: #d4c4ff;
}

.quick-nav-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

/* Disease Section Styling */
.disease-section {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
}

/* Chanting Guide Section */
.chanting-guide h2 {
    margin-bottom: 20px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.guide-item {
    background: linear-gradient(135deg, #f9f7ff 0%, #f0ebff 100%);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e9e2ff;
}

.guide-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.guide-item strong {
    display: block;
    color: #4c1d95;
    font-size: 14px;
    margin-bottom: 4px;
}

.guide-item p {
    color: #6b5b8c;
    font-size: 12px;
    margin: 0;
}

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

.disease-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9e2ff;
}

.disease-item strong {
    color: #4c1d95;
    font-size: 13px;
}

.disease-item span {
    color: #8B5CF6;
    font-size: 12px;
    font-weight: 600;
}

.subtitle {
    color: #6b5b8c;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* Section header with button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.section-header h1 {
    margin: 0;
}

.btn-universal {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-universal:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

@media (max-width: 640px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-universal {
        text-align: center;
    }

    .mantra-card-grid {
        grid-template-columns: 1fr;
    }

    .guide-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .disease-grid {
        grid-template-columns: 1fr;
    }
}

.alert {
    padding: 10px;
    border-radius: 10px;
}

.alert.error {
    background: #ffe6e6;
    color: #8c1f1f;
}

.alert.success {
    background: #e4f7e9;
    color: #22673d;
}

.auth-card {
    max-width: 460px;
    margin: 20px auto;
}

@media (max-width: 720px) {
    .counter-wrap .counter-head h1 {
        font-size: 22px;
    }

    .main-count {
        width: 140px;
        height: 140px;
        font-size: 44px;
    }

    .counter-side {
        width: 72px;
    }

    .counter-side strong {
        font-size: 26px;
    }

    .mantra-line {
        font-size: 18px;
    }

    .btn-jap {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .cards-4 {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .dialog-actions {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }

    .brand {
        font-size: 18px;
        flex-shrink: 0;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .right-topbar {
        width: auto;
        flex: 1;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 13px;
        padding: 6px 10px;
        background: rgba(139, 92, 246, 0.08);
        border-radius: 8px;
        white-space: nowrap;
    }

    .lang-form select {
        padding: 6px 24px 6px 10px;
        font-size: 12px;
        background-position: right 6px center;
        background-size: 14px;
    }

    .profile-menu summary {
        gap: 6px;
        padding: 4px 8px;
    }

    .profile-menu summary span:last-child {
        display: none;
    }

    .avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .profile-dropdown {
        right: 0;
        left: auto;
        min-width: 140px;
    }

    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }
}

.landing-wrap {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 22px;
    align-items: stretch;
    min-height: calc(100vh - 130px);
}

.landing-hero {
    background: linear-gradient(135deg, #351065, #5d2ec9 45%, #9a2bff);
    color: #fff;
    border-radius: 24px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(33, 10, 67, 0.25);
}

.landing-logo {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 42px;
    background: rgba(255, 255, 255, 0.16);
    margin-bottom: 14px;
}

.landing-hero h1 {
    margin: 0 0 8px;
    font-size: 40px;
    letter-spacing: 0.5px;
}

.landing-subtitle {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.5;
    max-width: 700px;
    opacity: 0.95;
}

.landing-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.landing-features span {
    background: rgba(255, 255, 255, 0.16);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.landing-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-secondary-outline {
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
}

.landing-card {
    background: #fff;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 15px 35px rgba(31, 17, 61, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-card h2 {
    margin: 0 0 4px;
    color: #37205e;
}

.landing-card p {
    margin: 0 0 14px;
    color: #5c4c82;
}

.landing-note {
    margin-top: 12px;
}

@media (max-width: 980px) {
    .landing-wrap {
        grid-template-columns: 1fr;
    }
}

.landing-body {
    min-height: 100vh;
    background: #f3f4f7;
}

.landing-shell {
    width: 100%;
    margin: 0;
    padding: 0;
}

.pro-landing {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.55fr 0.95fr;
    background: #f3f4f7;
    border-radius: 0;
    overflow: hidden;
}

.pro-left {
    background: radial-gradient(circle at 20% 20%, #7735ff 0%, #8520f3 38%, #d13cb3 72%, #ef47a4 100%);
    color: #fff;
    padding: 36px 30px;
    display: flex;
    flex-direction: column;
}

.pro-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 28px;
}

.pro-brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.15);
}

.pro-left h1 {
    margin: 0;
    font-size: 64px;
    line-height: 1.08;
    max-width: 780px;
}

.pro-left p {
    margin: 18px 0 0;
    max-width: 660px;
    line-height: 1.6;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.92);
}

.pro-feature-grid {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(190px, 260px));
    gap: 12px;
}

.pro-feature-box {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px;
    backdrop-filter: blur(2px);
}

.pro-feature-box strong {
    display: block;
    font-size: 16px;
}

.pro-feature-box small {
    color: rgba(255, 255, 255, 0.9);
}

.pro-right {
    display: grid;
    place-items: center;
    padding: 28px;
}

.pro-auth-card {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 12px 34px rgba(31, 15, 63, 0.12);
}

.pro-auth-card h2 {
    margin: 0;
    text-align: center;
    color: #21163b;
}

.pro-auth-card>p {
    text-align: center;
    color: #74658f;
    margin: 8px 0 16px;
}

.pro-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #e6dbff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

.pro-tabs a {
    text-align: center;
    text-decoration: none;
    padding: 10px 8px;
    color: #5a4487;
    font-weight: 700;
    background: #faf7ff;
}

.pro-tabs a.active {
    background: linear-gradient(90deg, #6e2ffd, #b228ef);
    color: #fff;
}

.pro-btn {
    border: 0;
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(90deg, #612eff, #b525ef);
    cursor: pointer;
}

.pro-footer-note {
    margin-top: 14px;
    font-size: 13px;
    color: #72648f;
    text-align: center;
}

@media (max-width: 1200px) {
    .pro-left h1 {
        font-size: 46px;
    }

    .pro-left p {
        font-size: 20px;
    }
}

@media (max-width: 900px) {
    .pro-landing {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .pro-left h1 {
        font-size: 38px;
    }

    .pro-left p {
        font-size: 18px;
    }

    .pro-feature-grid {
        margin-top: 20px;
        grid-template-columns: 1fr 1fr;
    }

    .pro-right {
        padding: 18px 14px 24px;
    }

    .pro-auth-card {
        width: 100%;
        max-width: 560px;
        border-radius: 14px;
        padding: 18px;
    }
}

@media (max-width: 560px) {
    .pro-left {
        padding: 22px 16px;
    }

    .pro-brand {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .pro-left h1 {
        font-size: 30px;
    }

    .pro-left p {
        font-size: 16px;
        margin-top: 12px;
    }

    .pro-feature-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pro-feature-box {
        padding: 12px;
    }

    .pro-tabs a {
        padding: 9px 6px;
        font-size: 14px;
    }

    .pro-btn {
        width: 100%;
    }
}