/* =========================================================
   GLOBAL STYLE — FixYourTitle
   Fonts: Ubuntu (titles), Open Sans (body)
   Colors: 
     Primary (#2979FF)
     Secondary (#7BAAF7)
     Neutral blacks/grays/whites
   Minimal, subtle, modern UI
   ========================================================= */

/* GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&family=Open+Sans:wght@300;400;600&display=swap');


/* =========================================================
   RESET / BASE STYLES
   ========================================================= */

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

html, body {
    font-family: "Open Sans", sans-serif;
    background: #ffffff;
    color: #111;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

ul, li {
    list-style: none;
}

a {
    color: #2979FF;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.75;
}


/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1, h2, h3, h4, h5 {
    font-family: "Ubuntu", sans-serif;
    line-height: 1.2;
    color: #111;
}

h1 { font-size: 2.4rem; margin-bottom: 12px; }
h2 { font-size: 1.8rem; margin-bottom: 10px; }
h3 { font-size: 1.3rem; margin-bottom: 8px; }

.subtitle {
    font-size: 1.05rem;
    opacity: 0.75;
    margin: 10px 0 20px;
}


/* =========================================================
   GLOBAL SECTION SPACING SYSTEM
   ========================================================= */

.section { margin: 48px 0; }
.section-sm { margin: 32px 0; }
.section-xs { margin: 16px 0; }


/* =========================================================
   LAYOUT STRUCTURE
   ========================================================= */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid #eaeaea;
    background: #fff;
}

.site-content, .homepage-wrapper, .upgrade-page, .admin-page {
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
    padding: 20px 16px;
}

.site-footer {
    text-align: center;
    padding: 26px 0;
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 40px;
}


/* =========================================================
   HEADER
   ========================================================= */

.logo {
    font-family: "Ubuntu", sans-serif;
    font-size: 1.4rem;
    text-decoration: none;
    color: #111;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-connect-btn {
    background: #2979FF;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.header-connect-btn:hover {
    background: #1f62d6;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-badge {
    background: #2979FF;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    color: #fff;
}

.settings-link {
    font-size: 1.2rem;
    text-decoration: none;
    cursor: pointer;
}


/* =========================================================
   CTAS
   ========================================================= */

.cta-connect,
.cta-premium,
.cta-premium-large {
    background: #2979FF;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cta-connect:hover,
.cta-premium:hover,
.cta-premium-large:hover {
    background: #1f62d6;
}

.cta-premium-large {
    font-size: 1.2rem;
    padding: 14px 26px;
    margin-top: 14px;
}


/* =========================================================
   HOMEPAGE SECTIONS
   ========================================================= */

.hero {
    margin-bottom: 40px;
    padding: 20px 0;
}

.connected-status {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green { background: #34C759; }

.last-update-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* HERO — Cycling Phrase */
.hero-title {
    font-size: 2.2rem;
    font-family: "Ubuntu", sans-serif;
    line-height: 1.25;
    max-width: 700px;
}

.generic-wrapper {
    text-decoration: underline;
    text-decoration-color: #2979FF;
    text-decoration-thickness: 2px;
    padding: 0 2px;
}

#generic-phrase {
    color: #111;
    font-weight: 700;
    transition: opacity 0.4s ease;
}



/* =========================================================
   COMPARISON TABLE
   ========================================================= */

.comparison-table {
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.comparison-row.header {
    background: #fafafa;
    font-weight: 600;
}

.premium-feature {
    background: #fcfcff;
}

.checkmark {
    color: #34C759;
    font-weight: bold;
}

.lock { opacity: 0.6; }


/* =========================================================
   FAQ — Polished Accordion (A–E Enhancements)
   ========================================================= */

.faq-container {
    margin: 40px 0;
    border-top: 1px solid #e6e6e6;
}

.faq-item {
    border-bottom: 1px solid #e6e6e6;
    padding: 16px 0;
    transition: background 0.25s ease;
}

.faq-item.open {
    background: #f8faff;
    border-left: 3px solid #2979FF;
    padding-left: 13px;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: "Ubuntu", sans-serif;
    font-size: 1rem;
    padding: 6px 0;
}

.faq-question:hover { opacity: 0.85; }

.faq-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    opacity: 0.75;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.faq-item.open .faq-icon {
    opacity: 1;
    transform: rotate(180deg);
}

.faq-answer {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    padding-right: 4px;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding-top: 10px;
    padding-bottom: 6px;
}

.faq-answer p {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.56;
}

.upgrade-page .mini-faq {
    margin-top: 40px;
}

.upgrade-page .mini-faq .faq-item {
    padding: 14px 0;
}



/* =========================================================
   PREMIUM HIGHLIGHTS
   ========================================================= */

.premium-highlights {
    margin-top: 42px;
    background: #f7faff;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #d9e6ff;
}

.sample-titles li { margin-bottom: 8px; }
.premium-bullets li { margin-bottom: 10px; }


/* =========================================================
   SETTINGS PANEL (Drawer) — FULLY UPDATED
   ========================================================= */

#settings-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #e6e6e6;
    box-shadow: -4px 0 12px rgba(0,0,0,0.08);
    padding: 24px;
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 9999;
}

#settings-panel.open { right: 0; }

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.settings-header h2 {
    font-size: 1.4rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #333;
    opacity: 0.7;
}
.close-btn:hover { opacity: 1; }

.settings-section {
    border-bottom: 1px solid #e6e6e6;
    padding-bottom: 32px;
    margin-bottom: 32px;
}

.settings-title {
    font-family: "Ubuntu", sans-serif;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.setting-item select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.toggle-group label { margin-right: 16px; }

/* Premium Locked */
.premium-disabled {
    opacity: 0.6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.locked {
    font-size: 0.85rem;
    color: #666;
}

/* Save Button */
.save-wrapper { padding-top: 8px; }

.save-btn {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    background: #2979FF;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.7;
}
.save-btn:enabled { opacity: 1; }
.save-btn:hover:enabled { opacity: 0.85; }

/* Disconnect Button */
.disconnect-btn {
    padding: 10px 12px;
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
}



/* =========================================================
   ADMIN PAGE
   ========================================================= */

.admin-page h1 {
    margin-bottom: 6px;
}

.admin-sub {
    opacity: 0.7;
    margin-bottom: 24px;
}

.admin-section {
    margin-bottom: 36px;
}

.admin-search-form {
    margin-bottom: 20px;
}

.admin-search-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.admin-search-form button {
    margin-left: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    background: #2979FF;
    color: #fff;
    cursor: pointer;
}

.admin-btn {
    background: #2979FF;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    margin-right: 10px;
    border: none;
    cursor: pointer;
}

.admin-btn.danger { background: #ff5252; }
.admin-btn.premium { background: #34C759; }

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

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {

    #settings-panel {
        width: 100%;
        right: -100%;
    }

    .comparison-row {
        grid-template-columns: 1fr 60px 60px;
    }

    .cta-premium-large {
        width: 100%;
        justify-content: center;
    }
}
