/* Base Styles */
:root {
    --app-green: rgb(128, 182, 77); /* App green from AccentColor.colorset */
    --dark-bg: #121212;
    --dark-surface: #1e1e1e;
    --light-text: #ffffff;
    --gray-text: #a0a0a0;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: var(--light-text);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--app-green);
}

img {
    max-width: 100%;
    height: auto;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.chess-loader {
    width: 80px;
    height: 80px;
    position: relative;
}

.chess-piece {
    width: 100%;
    height: 100%;
    background-image: url('images/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

/* Header */
header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background-color var(--transition-speed);
}

header.scrolled {
    background-color: rgba(30, 30, 30, 0.95);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

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

.logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo-container h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--app-green);
    transition: width var(--transition-speed);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    position: relative;
    overflow: hidden;
}

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

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 30px;
    max-width: 500px;
}

.app-store-button {
    display: inline-block;
    transition: transform var(--transition-speed);
}

.app-store-button:hover {
    transform: scale(1.05);
}

.app-store-button img {
    height: 50px;
}

.app-store-button.large img {
    height: 60px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-height: 600px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* Features Section */
.features {
    padding: 100px 0;
    background-color: var(--dark-surface);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--app-green);
}

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

.feature-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    max-width: 100%;
    max-height: 100%;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--app-green);
}

.feature-card p {
    color: var(--gray-text);
}

/* Screenshots Section */
.screenshots {
    padding: 100px 0;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    justify-items: center;
}

/* Articles Section */
.articles {
    padding: 100px 0;
    background-color: var(--dark-surface);
}

.articles-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 12px 0 0 0;
}

.article-card {
    background: var(--dark-surface);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    padding: 12px 10px 10px 10px;
    margin: 0;
    min-height: 120px;
    min-width: 0;
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
}

.article-category {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 14px;
}

@media (max-width: 480px) {
    .article-main article {
        padding: 24px 8px;
        margin: 0 4px;
    }
    .article-content {
        padding: 12px;
    }
    .article-category {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

.article-content {
    padding: 18px;
}

.article-card {
    background-color: rgba(30, 30, 30, 0.92); /* much darker, nearly opaque for strong contrast */
    border-radius: 15px;
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.article-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(128, 182, 77, 0.1), rgba(128, 182, 77, 0.05));
}

.article-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.article-content {
    padding: 30px;
    position: relative;
}

.article-content h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    line-height: 1.3;
}

.article-content h3 a {
    color: #fff;
    transition: color var(--transition-speed);
}

.article-content h3 a:hover {
    color: var(--app-green);
}

.article-excerpt {
    color: #e0e0e0;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.article-date {
    color: #b0b0b0;
}

.article-category {
    background-color: var(--app-green);
    color: var(--dark-bg);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

.read-more {
    color: var(--app-green);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
}

.read-more:hover {
    color: var(--light-text);
    border-bottom-color: var(--app-green);
    transform: translateX(3px);
}

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

.view-all-articles {
    display: inline-block;
    background-color: transparent;
    border: 2px solid var(--app-green);
    color: var(--app-green);
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 500;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.view-all-articles:hover {
    background-color: var(--app-green);
    color: var(--dark-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(128, 182, 77, 0.3);
}

.screenshot {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-speed);
}

.screenshot:hover {
    transform: scale(1.05);
}

.screenshot img {
    display: block;
    max-height: 600px;
}

/* Download Section */
.download {
    padding: 100px 0;
    text-align: center;
    background-color: var(--dark-surface);
}

.download p {
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    padding: 60px 0 30px;
    background-color: var(--dark-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.logo-small {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.copyright {
    text-align: center;
    color: var(--gray-text);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Article Styles */
.article-main {
    padding: 120px 0 80px;
    background-color: var(--dark-bg);
    min-height: calc(100vh - 200px);
}

.article-main article {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--dark-surface);
    border-radius: 20px;
    padding: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.article-main h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--light-text);
}

.article-meta {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-main .intro {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--light-text);
    margin-bottom: 50px;
    font-weight: 400;
}

.article-main h2 {
    font-size: 2rem;
    margin: 60px 0 30px;
    color: var(--app-green);
    line-height: 1.3;
}

.article-main h3 {
    font-size: 1.5rem;
    margin: 40px 0 20px;
    color: var(--light-text);
    line-height: 1.4;
}

.article-main p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--light-text);
}

.article-main ul,
.article-main ol {
    margin: 30px 0;
    padding-left: 40px;
}

.article-main li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--light-text);
}

.article-main strong {
    color: var(--app-green);
    font-weight: 600;
}

.article-main a {
    color: var(--app-green);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color var(--transition-speed);
}

.article-main a:hover {
    border-bottom-color: var(--app-green);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

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

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100vw;
        background: rgba(30,30,30,0.98);
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
        z-index: 200;
    }
    nav.open {
        display: block;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    nav ul li {
        margin: 18px 0;
    }
    .hamburger {
        display: block;
        width: 36px;
        height: 36px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 201;
    }
    .hamburger span {
        display: block;
        width: 28px;
        height: 4px;
        margin: 5px auto;
        background: var(--app-green);
        border-radius: 2px;
        transition: all 0.3s;
    }
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    .hero-content {
        padding-right: 0;
        margin-bottom: 32px;
    }
    .hero-image {
        margin-bottom: 0;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .feature-card {
        padding: 18px;
    }
    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .footer-content {
        flex-direction: column;
        gap: 18px;
        align-items: flex-start;
    }
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}
@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .feature-card h3 {
        font-size: 1.1rem;
    }
    .feature-card p {
        font-size: 0.95rem;
    }
    .footer-content {
        gap: 10px;
    }
    .footer-logo p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .article-excerpt {
        font-size: 0.9rem;
    }
    
    .view-all-articles {
        padding: 12px 24px;
        font-size: 0.8rem;
    }
    
    .article-main article {
        padding: 40px 30px;
        margin: 0 20px;
    }
    
    .article-main h1 {
        font-size: 2rem;
    }
    
    .article-main h2 {
        font-size: 1.6rem;
        margin: 40px 0 20px;
    }
    
    .article-main p,
    .article-main li {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article-main ul,
    .article-main ol {
        margin: 20px 0;
        padding-left: 25px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Articles Page Specific Styles */
.search-filter {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-input {
    padding: 12px 20px;
    background-color: var(--dark-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--light-text);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.search-input:focus {
    outline: none;
    border-color: var(--app-green);
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-button {
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--light-text);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.tag-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.tag-button.active {
    background-color: var(--app-green);
    border-color: var(--app-green);
    color: var(--dark-bg);
}

/* Adjust articles-grid for full page */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

@media (max-width: 600px) {
    .container {
        width: 100%;
        padding: 0 4px;
    }
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 4px 0 0 0;
    }
    .article-card {
        padding: 8px 4px 8px 4px;
        border-radius: 8px;
        min-height: 90px;
        font-size: 0.98rem;
    }
    .article-content {
        padding: 10px 4px 8px 4px;
    }
    .article-content h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    .article-excerpt {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
    .article-meta {
        flex-direction: column;
        gap: 2px;
        font-size: 0.85rem;
    }
    .read-more {
        display: inline-block;
        margin-top: 8px;
        font-size: 0.98rem;
        padding: 6px 14px;
        border-radius: 6px;
        background: var(--app-green);
        color: #fff;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
        transition: background 0.2s;
    }
    .read-more:active {
        background: #7bb24d;
    }
    .tag-filters {
        flex-wrap: wrap;
        gap: 4px;
        margin-bottom: 8px;
    }
    .tag-button {
        font-size: 0.85rem;
        padding: 4px 10px;
        border-radius: 6px;
    }
    .articles-intro {
        font-size: 1rem;
        margin-bottom: 24px;
        padding: 0 2px;
    }
}