:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --accent: #f97316;
    --light: #f8f9fa;
    --dark: #343a40;
    --success: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header / Navigation */

header {
    background: linear-gradient(to right, var(--secondary), var(--primary));
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
}

.logo i {
    margin-right: 10px;
    color: #FFD700;
    font-size: 28px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: rgba(255,255,255,0.1);
}

/* Buttons */

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-accent {
    background: var(--accent);
}

.btn-accent:hover {
    background: #e86a10;
}

/* Hero (index) */

.hero {
    background: url('https://images.unsplash.com/photo-1509391366360-2e959784a276?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Generic sections */

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    color: var(--secondary);
}

/* Features grid (index & about) */

.features {
    padding: 80px 0;
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    text-align: center;
    border-top: 4px solid var(--primary);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--primary);
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
    color: var(--secondary);
}

/* Demo blocks (index) */

.demo {
    padding: 60px 0;
    background-color: var(--light);
}

.demo-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: center;
}

.demo-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.demo-image img {
    width: 100%;
    height: auto;
    display: block;
}

.demo-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--secondary);
}

.demo-text p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* CTA (index & about) */

.cta {
    padding: 80px 0;
    text-align: center;
    background-color: var(--light);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--secondary);
}

.cta p {
    font-size: 18px;
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Page header (about / changelog) */

.page-header {
    background-color: var(--secondary);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 5px;
}

.breadcrumb span {
    margin: 0 5px;
    color: #ccc;
}

/* About page */

.about-section {
    padding: 80px 0;
    background-color: #fff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--secondary);
}

.about-text p {
    margin-bottom: 15px;
    font-size: 18px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.how-it-works,
.inverters-section {
    padding: 80px 0;
    background-color: var(--light);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.step-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.step-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
    color: var(--secondary);
}

.inverter-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.inverter-card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.inverter-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.inverter-card h3 i {
    font-size: 24px;
}

.inverter-list {
    list-style: none;
}

.inverter-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.inverter-list li:last-child {
    border-bottom: none;
}

.inverter-list li i {
    color: var(--success);
    margin-right: 8px;
    font-size: 12px;
}

.note {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

.cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--secondary);
    color: #fff;
}

.cta-section .cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-section .cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-section .cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #ddd;
}

/* Changelog page */

.changelog-wrapper {
    padding: 60px 0;
    background: #f7f7f9;
}

.changelog-card {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.changelog-card h1,
.changelog-card h2,
.changelog-card h3 {
    border-bottom: 1px solid #eee;
    padding-bottom: .3em;
    margin-top: 1.2em;
}

.changelog-card h1:first-child {
    margin-top: 0;
}

pre {
    background: #0f172a !important;
    color: #e5e7eb !important;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
}

code {
    background: #f1f5f9;
    color: #111827;
    padding: 2px 6px;
    border-radius: 4px;
}

pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0;
}

ul {
    padding-left: 20px;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Installer page */

.installer-page {
    padding: 40px 0;
}

.installer-card {
    background:#fff;
    padding:20px;
    border-radius:8px;
    box-shadow:0 2px 4px #0001;
}

.warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    border-left: 4px solid #ffc107;
}

.steps {
    margin-bottom: 20px;
}

.step {
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
}

.step:before {
    content: "•";
    position: absolute;
    left: 10px;
    color: #2c3e50;
}

button,
.gpio-button,
input[type=submit] {
    background:#2c3e50;
    color:#fff;
    padding:12px 20px;
    border:0;
    border-radius:4px;
    cursor:pointer;
    transition:.3s;
}

button:hover,
.gpio-button:hover,
input[type=submit]:hover {
    background:#34495e;
}

/* Footer */

.footer {
    background-color: var(--dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: #aaa;
}

/* Responsive */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        margin-bottom: 10px;
    }

    .demo-content {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .changelog-card {
        padding: 20px;
    }
}

