/* Modern Software Download Site CSS - Strict Professional Design */

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

:root {
    --primary-color: #1a56db;
    --primary-hover: #1e429f;
    --secondary-color: #6b7280;
    --accent-color: #059669;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --background: #ffffff;
    --background-alt: #f9fafb;
    --border-color: #d1d5db;
    --border-color-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 3px 7px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 9px 16px -3px rgb(0 0 0 / 0.1);
    --border-radius: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background-alt);
}

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

/* Header */
.header {
    background: var(--background);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    text-decoration: none;
    color: var(--text-primary);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: var(--primary-color);
    color: white;
    padding: 2.75rem 0;
    text-align: center;
    border-bottom: 3px solid var(--primary-hover);
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-note {
    font-size: 0.938rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-note strong {
    font-weight: 700;
    color: #ffc107;
}

/* Search Form */
.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-button {
    padding: 0.75rem 1.5rem;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-button:hover {
    background: var(--text-secondary);
}

/* Content Layout */
.content-section {
    padding: 2rem 0;
}

/* main content area with software list */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.main-content {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Software List Table */
.software-list-table {
    display: flex;
    flex-direction: column;
    gap: 0.9rem; /* slightly less than 1rem looks better */
}

/* each software row */
.software-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.5rem;
    padding: 1.2rem;
    background: var(--background);
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius);
    transition: all 0.2s;
    align-items: start;
}

.software-item:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.software-thumbnail {
    width: 120px;
    height: 90px;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: var(--background-alt);
    border: 1px solid var(--border-color-light);
}

.software-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.software-info {
    flex: 1;
}

.software-title-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.software-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.software-title a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.2s;
}

.software-title a:hover {
    color: var(--primary-color);
}

.software-version {
    background: var(--background-alt);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-color-light);
}

.software-category-tag {
    margin-bottom: 0.5rem;
}

.software-category-tag a {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.813rem;
    text-decoration: none;
    font-weight: 500;
}

.software-category-tag a:hover {
    background: var(--primary-hover);
}

.software-description {
    color: var(--text-secondary);
    font-size: 0.938rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.software-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
}

.software-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 140px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-section {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.sidebar-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-link {
    padding: 0.625rem 0.875rem;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: var(--border-radius);
    transition: all 0.2s;
    font-weight: 500;
    border: 1px solid transparent;
    font-size: 0.938rem;
}

.category-link:hover {
    background: var(--background-alt);
    border-color: var(--border-color-light);
}

.category-link.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--background-alt);
    border-color: var(--text-secondary);
}

.btn-download {
    background: var(--accent-color);
    color: white;
    font-size: 1rem;
    padding: 1rem 2rem;
    width: 100%;
    font-weight: 700;
    border: none;
}

.btn-download:hover {
    background: #047857;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    background: var(--background-alt);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
}

/* Software Detail Page */
.breadcrumb {
    background: var(--background);
    padding: 1rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.software-detail {
    padding: 2rem 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.detail-main {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.version-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 700;
}

.category-badge {
    display: inline-block;
    background: var(--background-alt);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    text-decoration: none;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.category-badge:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.detail-image {
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color-light);
}

.detail-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.description-content,
.whats-new-content,
.requirements-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color-light);
}

.specs-table tr {
    border-bottom: 1px solid var(--border-color-light);
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table td {
    padding: 0.875rem 1rem;
}

.specs-table td:first-child {
    width: 40%;
    background: var(--background-alt);
    font-weight: 600;
}

/* Detail Sidebar */
.detail-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.download-box,
.info-box {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.download-box h3,
.info-box h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.password-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--border-radius);
    padding: 0.875rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #856404;
    font-size: 0.938rem;
}

.password-notice strong {
    color: #664d03;
    font-weight: 700;
}

.download-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

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

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.info-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color-light);
}

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

.info-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.info-list a:hover {
    text-decoration: underline;
}

/* Related Software */
.related-software {
    margin-top: 3rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.related-software h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.software-card {
    background: var(--background);
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.2s;
}

.software-card:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.software-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--background-alt);
    border-bottom: 1px solid var(--border-color-light);
}

.software-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.software-content {
    padding: 1.25rem;
}

.software-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 3px solid var(--primary-color);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    font-weight: 500;
}

.footer-links a:hover {
    opacity: 1;
}

/* 404 Error Page */
.error-section {
    padding: 4rem 0;
    min-height: 60vh;
}

.error-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.error-title {
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
}

.error-content h2 {
    font-size: 2rem;
    margin: 1rem 0;
}

.error-message {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.error-search {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: left;
}

.error-search h3 {
    margin-bottom: 1rem;
}

.suggestions-section,
.categories-quick {
    margin-top: 3rem;
    text-align: left;
}

.suggestions-section h3,
.categories-quick h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.suggestions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.suggestion-item {
    padding: 1rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.suggestion-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quick-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quick-cat-link {
    padding: 0.5rem 1rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.938rem;
    transition: all 0.2s;
}

.quick-cat-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Static Pages (About, Contact, Privacy, Terms) */
.page-section {
    padding: 2rem 0;
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.page-content h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.content-block {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color-light);
}

.content-block:last-child {
    border-bottom: none;
}

.content-block p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.content-block ul,
.content-block ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.content-block li {
    margin-bottom: 0.5rem;
}

.content-block a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.content-block a:hover {
    text-decoration: underline;
}

.last-updated {
    font-size: 0.938rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
}

.cta-block {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.cta-block h3 {
    margin-bottom: 1.5rem;
}

.cta-block .btn {
    margin: 0 0.5rem;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-main h2 {
    margin-top: 0;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    padding: 1.5rem;
    background: var(--background-alt);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color-light);
}

.contact-method h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.contact-method p {
    margin-bottom: 0.5rem;
}

.contact-method strong {
    color: var(--primary-color);
}

.contact-sidebar .info-box {
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: -1;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-form {
        flex-direction: column;
    }

    .software-item {
        grid-template-columns: 1fr;
    }

    .software-thumbnail {
        width: 100%;
        height: 180px;
    }

    .software-actions {
        flex-direction: row;
        width: 100%;
    }

    .main-content {
        padding: 1.25rem;
    }

    .detail-main {
        padding: 1.25rem;
    }

    .detail-header {
        flex-direction: column;
        align-items: start;
    }

    .detail-header h1 {
        font-size: 1.5rem;
    }

    .footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .software-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
