:root {
    --primary: #6B46C1;
    --secondary: #9F7AEA;
    --background: #1C1C1C;
    --text: #E1E1E1;
    --card-bg: rgba(255, 255, 255, 0.05);
    /* Add link-specific colors */
    --link-color: #9F7AEA;         /* Same as secondary for consistency */
    --link-hover: #B794F4;         /* Lighter version of secondary */
    --link-visited: #805AD5;       /* Darker version of secondary */
    /* Base font size for regular text */
    --font-size-base: clamp(14px, 1.2vw, 14px);
    /* Never smaller than 14px, aims for 1.2% of viewport width, never larger than 16px */
    
    /* Font size for code blocks */
    --font-size-code: clamp(13px, 1.1vw, 14px);
    /* Never smaller than 14px, aims for 1.1% of viewport width, never larger than 16px */
    
    /* Heading font sizes */
    --font-size-h1: clamp(1.8rem, 3vw, 2.5rem);
    /* Never smaller than 1.8rem, aims for 3% of viewport width, never larger than 2.5rem */
    
    --font-size-h2: clamp(1.3rem, 2.5vw, 2rem);
    /* Never smaller than 1.3rem, aims for 2.5% of viewport width, never larger than 2rem */
    
    --font-size-h3: clamp(1rem, 2vw, 1.5rem);
    /* Never smaller than 1rem, aims for 2% of viewport width, never larger than 1.5rem */
    
    /* Base spacing unit */
    --spacing-base: clamp(1rem, 2vw, 1.5rem);
    /* Never smaller than 1rem, aims for 2% of viewport width, never larger than 1.5rem */
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

a:visited {
    /* color: var(--link-visited); */
    color: var(--link-color);
}

.btn,
.home-link,
.download-link,
.docs-nav a {
    color: white !important;  /* Force white color and override visited state */
    text-decoration: none !important;  /* Prevent underline on hover */
}

.btn:hover,
.home-link:hover,
.download-link:hover,
.docs-nav a:hover {
    color: white !important;  /* Keep white color on hover */
    text-decoration: none !important;
}

/* Optional: style for external links */
a[target="_blank"] {
    padding-right: 1.2em;
    background: url('data:image/svg+xml;utf8,<svg fill="%239F7AEA" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12px" height="12px"><path d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2z"/><path d="M13 0v2h6.59l-9.13 9.13 1.41 1.41 9.13-9.13v6.59h2v-10z"/></svg>') right center no-repeat;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* header {
    background: linear-gradient(45deg, #554488, #9F7AEA);
    padding: 80px 0;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
} */

header {
    width: 100%;
    background: linear-gradient(45deg, #554488, #9F7AEA);
    /* padding: var(--spacing-base) 0; */
    padding: 10px 0;
    margin: 0;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

header .container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-base);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.terraforce-logo {
    width: 80px;
    height: 80px;
}

.logo-text {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.hero {
    margin-bottom: 40px;
}

.hero-logo {
    justify-content: center;
    margin-bottom: 1rem;
}

.hero-logo .terraforce-logo {
    width: 120px;
    height: 120px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    margin: 0 auto;
    padding: 0 10px;
}

.features, .downloads, .usage {
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: white;
}

h3 {
    font-size: 1.7rem;
    margin-bottom: 15px;
    color: white;
}

h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: white;
}

.usage, .downloads {
    background: rgba(255, 255, 255, 0.02);
}

.code-block {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    font-size: 0.8em;
}

#btn {
    margin-top: 5px;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    margin: 5px auto 5px;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #9b9b9b;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.download-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.download-card h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

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

.checksum {
    font-family: monospace;
    font-size: 0.7rem;
    color: #888;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 10px;
    word-break: break-all;
}

.changelog {
    background: rgba(255, 255, 255, 0.02);
    padding: 60px 0;
}

.changelog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.changelog-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 25px;
}

.version-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.changelog-list {
    list-style: none;
}

.changelog-list ul {
    padding: 10px 0 10px 20px;  /* Added top padding and left indent */
    position: relative;
}

.changelog-list li {
    margin-bottom: 10px;
    padding: 0 20px 10px;
    position: relative;
}

/* Add specific styling for nested lists */
.changelog-list li > ul {
    margin-top: 15px;  /* Space between parent li and nested ul */
}

.changelog-list li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
}

/* .disclaimer {
    padding: 40px auto 10px 0;
} */

.disclaimer h3 {
    font-size: 1.2rem;
    color: rgb(132, 132, 132);
    margin-top: 20px;
}

.disclaimer h4 {
    font-size: 1rem;
    line-height: 2rem;
    color: rgb(132, 132, 132);
    margin-top: 30px;
}

.disclaimer p {
    font-size: 0.8rem;
    margin-bottom: 20px;
    color: rgb(132, 132, 132);
}

.disclaimer a {
    font-size: 0.8rem;
    text-decoration: none;
    color: rgb(132, 132, 132);
}

.disclaimer-list {
    list-style: none;
}

.disclaimer-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    font-size: 0.8rem;
    color: rgb(132, 132, 132);
}

.disclaimer-list li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
}

.download-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.download-link:hover {
    background: #6a559a;
}

.docker-command {
    background: #2d2d2d;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-family: monospace;
    text-align: left;
}

.disclaimer {
    max-width: 966px;
    margin: 20px auto 20px auto;
}

footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* @media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .features-grid, .download-grid {
        grid-template-columns: 1fr;
    }
} */

@media (max-width: 768px) {
    header {
        padding: calc(var(--spacing-base) * 0.75) 0;
        width: 100vw;
        margin: 0;
        /* left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw; */
    }

    .terraforce-logo {
        width: 32px;
        height: 32px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }

    .hero-logo .terraforce-logo {
        width: 100px;
        height: 100px;
    }

    header .container {
        width: 100%;
        max-width: none;
        padding: 0 calc(var(--spacing-base) * 0.75);
    }

    /* Adjust header title for mobile */
    header h1 {
        font-size: var(--font-size-h1);
        margin: calc(var(--spacing-base) * 0.5) 0;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .features-grid, .download-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: calc(var(--spacing-base) * 0.5) 0;
    }

    header .container {
        padding: 0 var(--spacing-base);
    }

    .hero-logo .terraforce-logo {
        width: 80px;
        height: 80px;
    }
}