:root {
    --bg-main: #F1F5F9; /* Light-neutral background color */
    --card-bg: #FFFFFF; /* Clean white cards for separation */
    --accent-pink: #d946ef;
    --accent-red: #ef4444; /* Replaced purple with modern vibrant red */
    --text-dark: #0f172a; /* Slate 900 for high-contrast typography */
    --text-muted: #475569; /* Slate 600 for labels and subtitles */
    --border-color: #e2e8f0; /* Soft borders */
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    min-height: 100vh;
    box-sizing: border-box;
}

.tool{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 520px;
}

.above_content {
    text-align: center;
    margin-bottom: 25px;
}

.above_content h1 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    background: linear-gradient(to right, var(--accent-red), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.above_content p {
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05), 0 20px 25px -5px rgba(0, 0, 0, 0.03);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

input, select {
    width: 100%;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-dark);
    box-sizing: border-box;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--accent-red);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    outline: none;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-red) 0%, #b91c1c 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.3);
    opacity: 0.95;
}

.accordion-toggle {
    background: transparent;
    color: var(--accent-red);
    border: none;
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    width: auto;
}
.accordion-toggle:hover {
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

.hidden { display: none !important; }

/* Result Card / Share Card Specifics */
.result-card {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    color: #ffffff;
    text-align: center;
    border: none;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(239, 68, 68, 0.3);
}

.result-card h2 {
    color: #ffffff;
    margin-top: 0;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.names-display {
    font-size: 1.6rem;
    font-weight: bold;
    margin: 20px 0;
    letter-spacing: -0.5px;
}

.heart-pulse {
    display: inline-block;
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px auto;
    font-size: 2.2rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.metrics {
    margin-top: 25px;
    text-align: left;
    background: rgba(0, 0, 0, 0.15);
    padding: 16px;
    border-radius: 12px;
}

.metric {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}
.metric:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.metric .label {
    opacity: 0.9;
}

.watermark {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 20px 0 0 0;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.btn-secondary:hover {
    background: #f8fafc;
    color: var(--text-dark);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.details-card h3, .extras-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 700;
}

.details-card p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

ul {
    padding-left: 0;
    list-style: none;
    margin-bottom: 20px;
}

.list-green li { color: #16a34a; margin-bottom: 8px; font-size: 0.95rem; font-weight: 500; }
.list-orange li { color: #d97706; margin-bottom: 8px; font-size: 0.95rem; font-weight: 500; }

.badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.badge {
    background: #fef2f2;
    color: var(--accent-red);
    border: 1px solid #fee2e2;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.extras-grid {
    display: flex;
    gap: 10px;
}

.extras-grid button {
    background: #f8fafc;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 12px;
    box-shadow: none;
    font-weight: 600;
}
.extras-grid button:hover {
    background: #f1f5f9;
    box-shadow: none;
}

.extra-display {
    margin-top: 15px;
    padding: 14px;
    background: #f8fafc;
    color: var(--text-dark);
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid var(--accent-red);
    font-size: 0.95rem;
}

.disclaimer {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    margin-top: 25px;
}

/* Header + Mobile Menu */
/* HEADER */
header {
    background: #f8f9fb;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] header {
    background: #000000;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
    
}

/* Desktop Nav */
#nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    opacity: 0.8;
}

[data-theme="dark"] .nav-link{
    color: #fff;
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    z-index: 1002;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #111;
    border-radius: 3px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .menu-toggle span {
    background: #fff;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Fix: Make X icon dark when menu is open in light mode */
.menu-toggle.active span {
    background: #212529;
}

[data-theme="dark"] .menu-toggle.active span {
    background: #fff;
}

/* MOBILE MENU FIX */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    #nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 80px 0 20px 0;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
    }

    [data-theme="dark"] #nav {
        background: #1e1e1e;
    }

    #nav.active {
        right: 0;
    }

    #nav .nav-link {
        color: #212529 !important;
        font-size: 1.1rem !important;
        width: 100% !important;
        padding: 16px 24px !important;
        border-bottom: 1px solid #e0e0e0 !important;
        display: block !important;
        opacity: 1 !important;
    }

    [data-theme="dark"] #nav .nav-link {
        color: #f8f9fa !important;
        border-bottom: 1px solid #444 !important;
    }

    #nav .nav-link:first-child {
        border-top: 1px solid #e0e0e0 !important;
    }

    [data-theme="dark"] #nav .nav-link:first-child {
        border-top: 1px solid #444 !important;
    }

    #nav .nav-link:hover {
        background: #f5f5f5;
    }

    [data-theme="dark"] #nav .nav-link:hover {
        background: #2a2a2a;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1000;
    }
}

* Footer */
footer {
    background-color: var(--bg-card);
    color: var(--text-muted);
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    margin-top: 5rem;
    transition: background 0.3s ease;
}

.footer-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.footer-menu a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

.footer-menu a:hover {
    color: #e63946;
}

.footer-divider {
    height: 1px;
    width: 100%;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

.footer-copy {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: center;
    padding-bottom: 2%;
}

.footer-copy .footer-link {
    color: #b22234;
    text-decoration: none;
}

/* article CSS*/
.love-calculator-article {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #0f172a; /* Slate 900 */
    line-height: 1.7;
    font-size: 1.05rem;
}

.love-calculator-article h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(to right, #ef4444, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.love-calculator-article h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    color: #1e293b; /* Slate 800 */
    letter-spacing: -0.5px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.love-calculator-article h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 12px;
    color: #334155; /* Slate 700 */
}

.love-calculator-article p {
    margin-top: 0;
    margin-bottom: 20px;
    color: #475569; /* Slate 600 */
}

.love-calculator-article ul {
    margin-bottom: 24px;
    padding-left: 24px;
}

.love-calculator-article li {
    margin-bottom: 8px;
    color: #475569;
}

.love-calculator-article strong {
    color: #0f172a;
}

/* Custom flow chart / process box block */
.love-calculator-article .flowchart-box {
    font-family: monospace;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    color: #ef4444;
}

/* Table Design styling updates */
.love-calculator-article table {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.love-calculator-article th {
    color: #1e293b;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.love-calculator-article td {
    font-size: 0.95rem;
}

.love-calculator-article tbody tr:hover {
    background-color: #f8fafc;
}

/* Blockquote/Disclaimer layout adjustments */
.love-calculator-article blockquote {
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.05);
    font-style: normal;
}

/* Responsive breakpoint design scales */
@media (max-width: 640px) {
    .love-calculator-article {
        padding: 16px;
        margin: 20px auto;
    }
    
    .love-calculator-article h1 {
        font-size: 2rem;
    }

    .love-calculator-article h2 {
        font-size: 1.45rem;
    }
    
    .love-calculator-article .flowchart-box {
        font-size: 0.8rem;
        padding: 12px 6px;
    }
}

/* FAQ Section */
.faq-section {
    max-width: 850px;
    margin: 40px auto;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 15px;
    overflow: hidden;
    transition: .3s;
}

.faq-item:hover {
    border-color: #ff4d6d;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 55px 18px 20px;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    position: relative;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Plus Icon */
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff4d6d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    transition: .3s;
}

/* Minus Icon */
.faq-item[open] summary::after {
    content: "−";
    background: #e63946;
}

.faq-content {
    padding: 0 20px 20px;
    color: #555;
    line-height: 1.8;
    animation: fadeIn .3s ease;
}

.faq-content p {
    margin-top: 0;
}

.faq-content ul {
    margin: 15px 0 0 20px;
}

.faq-content li {
    margin-bottom: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width:768px){

    .faq-item summary{
        font-size:16px;
        padding:16px 50px 16px 16px;
    }

    .faq-content{
        padding:0 16px 16px;
        font-size:15px;
    }

    .faq-item summary::after{
        width:24px;
        height:24px;
        font-size:18px;
    }

}

/* Top Ad Hide on mobile*/
@media (max-width: 767px) {
    .hide-on-mobile-tab {
        display: none !important;
    }
}