/* Theme V1 - Styles */
:root {
    --primary: #0E7C86; 
    --primary-dark: #095c63; 
    --accent-soft: #E0F2F1;
    --bg-white: #ffffff; 
    --bg-off-white: #F9FAFB;
    --text-heading: #111827; 
    --text-body: #4B5563; 
    --text-light: #9CA3AF;
    --container-max: 1200px; 
    --radius-md: 8px; 
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}

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

body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text-body); 
    line-height: 1.6; 
    background: var(--bg-white); 
}

h1, h2, h3, h4 { 
    color: var(--text-heading); 
    font-weight: 700; 
    line-height: 1.2; 
}

a { 
    text-decoration: none; 
    transition: color 0.2s; 
}

.container { 
    max-width: var(--container-max); 
    margin: 0 auto; 
    padding: 0 24px; 
}

.section-padding { 
    padding: 96px 0; 
}

.bg-gray { 
    background-color: var(--bg-off-white); 
}

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

.btn { 
    display: inline-flex; 
    padding: 12px 28px; 
    border-radius: var(--radius-md); 
    font-weight: 600; 
    cursor: pointer; 
    border: none; 
}

.btn-primary { 
    background: var(--primary); 
    color: white; 
}

.btn-outline { 
    background: white; 
    border: 1px solid #D1D5DB; 
    color: var(--text-heading); 
}

/* Grid System */
.grid-2 { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 40px; 
}

.grid-3 { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 30px; 
}

@media (min-width: 768px) { 
    .grid-2 { 
        grid-template-columns: 1fr 1fr; 
    } 
    .grid-3 { 
        grid-template-columns: repeat(3, 1fr); 
    }
    
    /* Remove mobile margins on desktop for proper centering - only for section-padding sections, not hero */
    section.section-padding.container[style*="margin-left: 15px"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Center content in left column of grid-2 on desktop for landing sections */
    .section-padding.container .grid-2 > div:first-child {
        text-align: center;
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    h1 { 
        font-size: 2rem !important; 
    }
    h2 { 
        font-size: 1.75rem !important; 
    }
    .container { 
        padding: 0 16px; 
    }
    .nav-left .nav-link {
        display: none;
    }
    .feature-card { 
        padding: 24px; 
    }
    .section-padding { 
        padding: 48px 0; 
    }
    .hero-preview { 
        height: 250px !important; 
        margin-top: 30px !important;
    }
    .hero-preview svg { 
        width: 32px !important; 
        height: 32px !important; 
    }

    /* Force 15px left/right margin for all sections on mobile */
    section,
    section.container,
    section.section-padding {
        margin-left: 15px !important;
        margin-right: 15px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Remove container padding inside sections to avoid double spacing */
    section .container,
    section.container .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Navbar */
nav { 
    position: sticky; 
    top: 0; 
    background: rgba(255,255,255,0.95); 
    backdrop-filter: blur(10px); 
    border-bottom: 1px solid #eee; 
    z-index: 100; 
}

.nav-inner { 
    height: 80px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: relative; 
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    color: var(--text-heading);
    line-height: 1.1;
    background: transparent;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-off-white);
    box-shadow: var(--shadow-sm);
}

.nav-links { 
    display: flex; 
    gap: 16px; 
    align-items: center; 
}

.credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--primary-dark);
    border: 1px solid #C8E6C9;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
}

.credits-badge.warning {
    background: #fff7e6;
    border-color: #fcd27c;
    color: #b26b00;
}

.credits-badge.danger {
    background: #ffecec;
    border-color: #ff9c9c;
    color: #b00020;
}
.mobile-credits-row {
    padding: 12px 24px;
    border-bottom: 1px solid #F3F4F6;
}

.nav-links a { 
    color: var(--text-heading); 
    font-weight: 500; 
}

/* Hamburger Menu */
.hamburger { 
    display: none; 
    flex-direction: column; 
    gap: 5px; 
    cursor: pointer; 
    padding: 8px; 
}

/* Mobile-first: Hide desktop nav by default, show only on desktop */
.nav-auth:not(.mobile),
.nav-links.logged-in-nav {
    display: none;
}

/* Desktop: Hide mobile menu content by default */
.mobile-menu .nav-auth.mobile,
.mobile-menu .logged-in-mobile {
    display: none !important;
}

/* Mobile: Hide mobile menu content by default (only show when .active) */
@media (max-width: 767px) {
    .mobile-menu:not(.active) .nav-auth.mobile,
    .mobile-menu:not(.active) .logged-in-mobile {
        display: none !important;
    }
}

/* Desktop: Ensure hamburger is hidden */
@media (min-width: 768px) {
    .hamburger {
        display: none !important;
    }
    .mobile-menu {
        display: none !important;
    }
    /* Ensure desktop nav shows on desktop only */
    nav .nav-auth:not(.mobile) {
        display: flex !important;
        gap: 16px;
    }
    nav .nav-links.logged-in-nav {
        display: flex !important;
    }
    .nav-inner .nav-auth:not(.mobile) {
        display: flex !important;
        gap: 16px;
    }
    .nav-inner .nav-links.logged-in-nav {
        display: flex !important;
    }
}

.hamburger span { 
    width: 24px; 
    height: 2px; 
    background: var(--text-heading); 
    transition: 0.3s; 
}

.mobile-menu { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    right: 0; 
    background: white; 
    border-top: 1px solid #eee; 
    box-shadow: var(--shadow-md); 
}

.mobile-menu.active { 
    display: block; 
}

.mobile-menu a { 
    display: block; 
    padding: 16px 24px; 
    color: var(--text-heading); 
    border-bottom: 1px solid #F3F4F6; 
}

.mobile-menu hr { 
    margin: 8px 0; 
    border: none; 
    border-top: 1px solid #E5E7EB; 
}

/* User Avatar & Dropdown */
.user-menu { 
    position: relative; 
}

.user-avatar { 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    background: var(--primary); 
    color: white; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 600; 
    cursor: pointer; 
    font-size: 0.875rem; 
}

.user-dropdown { 
    display: none; 
    position: absolute; 
    top: calc(100% + 8px); 
    right: 0; 
    background: white; 
    border: 1px solid #E5E7EB; 
    border-radius: var(--radius-md); 
    box-shadow: var(--shadow-md); 
    min-width: 200px; 
    z-index: 1000; 
}

.user-dropdown.active { 
    display: block; 
}

.user-dropdown a { 
    display: block; 
    padding: 12px 16px; 
    color: var(--text-heading); 
    font-size: 0.9rem; 
}

.user-dropdown a:hover { 
    background: var(--bg-off-white); 
}

.user-dropdown hr { 
    margin: 4px 0; 
    border: none; 
    border-top: 1px solid #E5E7EB; 
}

/* Logged-in header state - Desktop ONLY */
@media (min-width: 768px) {
    body.logged-in .nav-links.logged-in-nav { 
        display: flex !important; 
    }

    body.logged-in .nav-auth { 
        display: none !important; 
    }
}

/* Logged-in mobile menu - only show on mobile when active */
body.logged-in .mobile-menu .nav-auth.mobile { 
    display: none !important; 
}

/* Note: .logged-in-mobile display is controlled by mobile media query */

@media (max-width: 767px) {
    /* Show hamburger on mobile */
    .hamburger { 
        display: flex !important; 
    }
    
    /* Hide all desktop navigation on mobile - more specific selectors */
    nav .nav-links { 
        display: none !important; 
    }
    nav .nav-links.logged-in-nav {
        display: none !important;
    }
    nav .nav-auth:not(.mobile) { 
        display: none !important; 
    }
    .nav-inner .nav-links {
        display: none !important;
    }
    .nav-inner .nav-links.logged-in-nav {
        display: none !important;
    }
    .nav-inner .nav-auth:not(.mobile) {
        display: none !important;
    }
    
    /* Show mobile menu content when active */
    .mobile-menu.active .nav-auth.mobile {
        display: block !important;
    }
    .mobile-menu.active .logged-in-mobile {
        display: block !important;
    }
}

/* Specific Feature Chips */
.chip { 
    display: inline-block; 
    background: var(--accent-soft); 
    color: var(--primary); 
    padding: 4px 10px; 
    border-radius: 4px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    margin-bottom: 12px; 
    text-transform: uppercase; 
    letter-spacing: 0.05em;
}

/* Card tweak */
.feature-card { 
    padding: 32px; 
    background: white; 
    border: 1px solid #F3F4F6; 
    border-radius: var(--radius-md); 
    transition: 0.3s; 
    height: 100%; 
}

.feature-card:hover { 
    border-color: var(--primary); 
    box-shadow: var(--shadow-md); 
    transform: translateY(-2px); 
}

.feature-list { 
    list-style: none; 
    margin-top: 16px; 
}

.feature-list li { 
    margin-bottom: 8px; 
    font-size: 0.95rem; 
    color: var(--text-body); 
    display: flex; 
    gap: 8px; 
}

.feature-list li::before { 
    content: "•"; 
    color: var(--primary); 
    font-weight: bold; 
}

/* Icon styling */
.feature-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-inline {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Result rendering */
#result {
    margin-top: 24px;
}

.result-banner {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.result-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}

.result-card {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: 0 12px 36px rgba(17, 24, 39, 0.1);
    margin-bottom: 18px;
}

.result-card:last-child {
    margin-bottom: 0;
}

.result-card h3 {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    color: var(--text-heading);
    letter-spacing: 0.01em;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.result-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.result-close:hover {
    color: var(--text-heading);
}

.result-card dl {
    margin: 0;
}

.result-card dt,
.result-card dd {
    margin: 0;
}

.kv-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    column-gap: 12px;
    row-gap: 8px;
}

.kv-list.kv-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kv-row {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    align-items: center;
}

.kv-key {
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.kv-val a {
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
}

.kv-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.kv-link:hover {
    text-decoration: underline;
}

.kv-list dt {
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
}

.kv-list dd {
    color: var(--text-body);
    font-size: 0.95rem;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    padding: 10px;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    background: var(--bg-off-white);
    box-shadow: var(--shadow-sm);
}

.result-item .item-title {
    font-weight: 600;
    color: var(--text-heading);
}

.result-item .item-body {
    margin-top: 4px;
    color: var(--text-body);
}

.result-card a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.result-card a:hover {
    text-decoration: underline;
}

.result-actions {
    margin-top: 10px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Hero / summary */
.result-hero {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: 0 10px 32px rgba(17, 24, 39, 0.08);
}

.hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-body);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.hero-meta a {
    color: var(--primary);
    font-weight: 600;
}

.hero-summary {
    color: var(--text-body);
    margin: 6px 0 10px 0;
}

.mood-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--accent-soft);
    color: var(--text-heading);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 6px;
}

.pill-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.review-summary {
    margin-top: 12px;
    color: var(--text-body);
    font-size: 0.95rem;
}

/* Tech details */
.tech-card details {
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.tech-card summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 700;
    color: var(--text-heading);
    background: var(--bg-off-white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-list {
    list-style: none;
    margin: 0;
    padding: 12px 14px 14px 14px;
}

.tech-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dotted #E5E7EB;
    color: var(--text-body);
    font-size: 0.95rem;
}

.tech-list li:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    background: #1F2937;
    color: #9CA3AF;
    padding: 40px 0;
}

footer h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

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

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

footer p {
    font-size: 0.85rem;
    margin: 0;
}

.footer-version {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #374151;
}

.footer-version span {
    font-size: 0.7rem;
    line-height: 1.2;
    color: #6B7280;
}

/* Mobile Footer */
@media (max-width: 767px) {
    footer {
        padding: 32px 0;
    }
    
    footer h4 {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        margin-bottom: 24px;
    }
    
    .footer-links a {
        font-size: 0.9rem;
        padding: 8px 0;
    }
    
    footer p {
        font-size: 0.8rem;
        padding: 0 16px;
    }
    
    .footer-version {
        margin-top: 20px;
        padding-top: 12px;
    }
}

/* Spin animation for loading icons */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

