/* ================================
   FuelFlow Dark Theme - Mobile First
   Warm Energy Color Palette

   Yellow-Orange-Red gradient inspired by
   the FuelFlow app icon's energy bars.
   ================================ */

:root {
    /* Dark Theme Colors */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;

    /* FuelFlow Brand Colors - Warm Energy Palette */
    --fuelflow-golden: #FFD200;        /* Bright golden yellow - Energy, vitality */
    --fuelflow-orange: #FFA500;        /* Warm orange - Enthusiasm, action */
    --fuelflow-tangerine: #FF8C00;     /* Deep orange - Warmth, motivation */
    --fuelflow-coral: #FF5252;         /* Vibrant coral red - Passion, power */
    --fuelflow-red: #E53935;           /* Deep red - Intensity, urgency */

    /* Semantic Mappings */
    --accent-primary: var(--fuelflow-coral);
    --accent-secondary: var(--fuelflow-orange);
    --accent-highlight: var(--fuelflow-golden);
    --accent-intense: var(--fuelflow-red);

    --border-color: #333;
    --shadow: rgba(0, 0, 0, 0.5);

    /* FuelFlow Gradients - Matching App Icon Energy Bars */
    --gradient-energy: linear-gradient(135deg, var(--fuelflow-golden), var(--fuelflow-orange), var(--fuelflow-coral));
    --gradient-fuel: linear-gradient(90deg, var(--fuelflow-golden) 0%, var(--fuelflow-tangerine) 50%, var(--fuelflow-red) 100%);
    --gradient-warmth: linear-gradient(180deg, var(--fuelflow-golden), var(--fuelflow-coral));
    --gradient-intensity: linear-gradient(135deg, var(--fuelflow-orange), var(--fuelflow-red));
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    min-height: 100vh;
}

/* ================================
   Typography
   ================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

h1 {
    font-size: 2rem;
    background: var(--gradient-energy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-secondary);
}

strong {
    color: var(--text-primary);
}

/* ================================
   Layout
   ================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    overflow-x: hidden;
}

.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    width: 100%;
    overflow-x: hidden;
}

/* ================================
   Navigation
   ================================ */

.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    margin: 0;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-energy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-primary);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-menu {
        position: fixed;
        left: -100vw;
        top: 70px;
        flex-direction: column;
        background: var(--bg-secondary);
        width: 100vw;
        max-width: 100vw;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow);
        border-bottom: 1px solid var(--border-color);
        gap: 0;
        padding: 1rem 0;
        overflow-x: hidden;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
    }
}

/* ================================
   Page Content
   ================================ */

.page-content {
    padding: 2rem 0;
    width: 100%;
    overflow-x: hidden;
}

article {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
}

/* ================================
   Buttons
   ================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    max-width: 100%;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-fuel);
    background-size: 100% 100%;
    background-position: center;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 82, 82, 0.5);
}

.btn-secondary {
    background: transparent;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

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

/* ================================
   Lists
   ================================ */

ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.5rem;
}

/* ================================
   Code Blocks
   ================================ */

code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-primary);
}

pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

pre code {
    background: none;
    padding: 0;
}

/* ================================
   Blockquotes
   ================================ */

blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* ================================
   Tables
   ================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow-x: auto;
    display: block;
}

thead {
    background: var(--bg-secondary);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-primary);
}

td {
    color: var(--text-secondary);
}

/* ================================
   Images
   ================================ */

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* ================================
   Screenshot Gallery
   ================================ */

/* Screenshots are constrained to reasonable heights */
img[src*="screenshots/iphone"] {
    max-height: 400px;
    width: auto;
    max-width: 100%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin: 1rem auto;
    border: 1px solid var(--border-color);
}

img[src*="screenshots/watch"] {
    max-height: 250px;
    width: auto;
    max-width: 100%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin: 1rem auto;
    border: 1px solid var(--border-color);
}

/* Hover effect for screenshots */
img[src*="screenshots/"]:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 82, 82, 0.3);
}

/* Larger screenshots on bigger screens */
@media (min-width: 768px) {
    img[src*="screenshots/iphone"] {
        max-height: 500px;
    }

    img[src*="screenshots/watch"] {
        max-height: 300px;
    }
}

/* ================================
   Horizontal Rules
   ================================ */

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

/* ================================
   Footer
   ================================ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-secondary);
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

/* ================================
   Responsive Typography
   ================================ */

/* Mobile-specific fixes */
@media (max-width: 767px) {
    .btn {
        max-width: calc(100vw - 2rem);
        padding: 0.75rem 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }
}

@media (min-width: 768px) {
    body {
        font-size: 18px;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 2rem;
    }

    .main-content {
        padding: 4rem 0;
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }
}

/* ================================
   Utility Classes
   ================================ */

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 3rem; }

/* ================================
   App Store Badges
   ================================ */

.store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin: 1.5rem 0;
    overflow: visible;
}

.store-badges a {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.store-badges a:hover {
    opacity: 0.8;
}

.store-badge {
    height: 40px;
    width: auto;
    border-radius: 0;
    margin: 0;
    border: none;
}

/* Google Play badge has extra padding built in, so scale it up */
.store-badge[alt*="Google Play"] {
    height: 60px;
    margin: -10px 0;
}

@media (min-width: 768px) {
    .store-badge {
        height: 50px;
    }

    .store-badge[alt*="Google Play"] {
        height: 74px;
        margin: -12px 0;
    }
}

/* ================================
   Animations
   ================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-content {
    animation: fadeIn 0.5s ease-out;
}
