/* Basic CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: rgb(227, 185, 32);
    --black54: rgba(0, 0, 0, 0.54);
    --black: #000000;
    --white: #FFFFFF;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: var(--black);
    overflow-x: hidden;
    background: var(--white);
    -webkit-text-size-adjust: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

#root {
    margin-bottom: 20px;
}

#htmx-content {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Particles Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px var(--black54);
    z-index: 100;
    backdrop-filter: blur(5px);
    padding: 0.5rem;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.main-nav li {
    margin: 0.25rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--black);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.main-nav a.active,
.main-nav a:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Main Content */
main {
    position: relative;
    z-index: 2;
    padding-top: max(80px, 15vh);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

section {
    min-height: 100vh;
    padding: clamp(1rem, 5vw, 2rem);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.active-section {
    opacity: 1;
    transform: translateY(0);
}

.hidden-section {
    display: none;
}

/* Hero Section */
.hero {
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
}

.logo-container {
    width: min(200px, 50vw);
    height: min(200px, 50vw);
    margin: 0 auto clamp(1rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 20px;
}

.main-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
    color: var(--black);
}

.tagline {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--black54);
    margin-bottom: clamp(1.5rem, 5vw, 3rem);
}

/* Benefits Section */
.benefits {
    background: var(--white);
    padding: clamp(1rem, 3vw, 2rem);
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--black54);
    margin-bottom: clamp(1.5rem, 5vw, 3rem);
}

.benefits h2 {
    color: var(--black);
    margin-bottom: 1.5rem;
}

.benefits ul {
    list-style: none;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.benefits li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Download Section */
.download-section {
    margin-top: 2rem;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.download-button {
    display: inline-block;
    transition: transform 0.3s ease;
    background: transparent;
    padding: 0;
}

.download-button:hover {
    transform: translateY(-2px);
}

.download-button img {
    height: 60px;
    width: auto;
    display: block;
}

/* Screenshot Gallery */
.screenshot-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.screenshot-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--black54);
    transition: transform 0.3s ease;
}

.screenshot-item:hover {
    transform: translateY(-5px);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.screenshot-item p {
    padding: 1rem;
    text-align: center;
    color: var(--black);
    font-weight: 500;
}

/* Responsive adjustments for screenshots */
@media (max-width: 768px) {
    .screenshot-gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .screenshot-gallery {
        grid-template-columns: 1fr;
    }
}

/* Credits Section */
.credits-container {
    max-width: min(800px, 90vw);
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--black54);
}

.team-section, .technologies-section {
    margin: 2rem 0;
}

.team-member, .tech-item {
    padding: clamp(1rem, 3vw, 1.5rem);
    margin: clamp(0.5rem, 2vw, 1rem) 0;
    background: rgba(227, 185, 32, 0.1);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.team-member:hover, .tech-item:hover {
    transform: translateY(-2px);
}

.team-member h4 a {
    color: var(--black);
    text-decoration: none;
    transition: color 0.3s ease;
}

.team-member h4 a:hover {
    color: var(--primary-color);
}

.credits-container h2 {
    color: var(--black);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.credits-container h3 {
    color: var(--black);
    margin: 1.5rem 0;
    font-size: 1.8rem;
}

.team-member h4, .tech-item h4 {
    color: var(--black);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.team-member p, .tech-item p {
    color: var(--black54);
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Timeline Section */
.timeline-container {
    max-width: min(1000px, 90vw);
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
}

.timeline {
    position: relative;
    padding: clamp(20px, 5vw, 40px) 0;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    transform: translateY(-50%);
    z-index: 2;
}

.timeline-dots {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 clamp(20px, 5vw, 40px);
}

.timeline-dot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.dot {
    width: clamp(20px, 4vw, 30px);
    height: clamp(20px, 4vw, 30px);
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--black54);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    transform: translateY(-50%);
}

.timeline-dot.active .dot {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--white);
}

.timeline-dot.locked .dot {
    background: var(--white);
    border-color: var(--black54);
    box-shadow: 0 0 0 4px var(--white);
}

.lock-icon {
    font-size: 12px;
    color: var(--black54);
}

.label {
    font-size: clamp(12px, 2.5vw, 14px);
    color: var(--black);
    margin-top: clamp(15px, 4vw, 25px);
    font-weight: 500;
}

.timeline-dot.active .label {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .timeline-dots {
        margin: 0 20px;
    }

    .dot {
        width: 24px;
        height: 24px;
    }

    .lock-icon {
        font-size: 10px;
    }

    .label {
        font-size: 12px;
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        margin-top: 12px;
    }
}

/* Terms and Conditions Section */
.terms-container {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--black54);
}

.download-tos {
    text-align: center;
    margin: 1rem 0 2rem;
}

.tos-download-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tos-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(227, 185, 32, 0.3);
}

.terms-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.tos-date {
    color: var(--black54);
    margin: 1rem 0 2rem;
    text-align: right;
}

.tos-section {
    margin: 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tos-section:last-child {
    border-bottom: none;
}

.tos-section h4 {
    color: var(--black);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tos-section p {
    margin: 0.5rem 0;
    color: var(--black54);
}

.tos-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.tos-section a:hover {
    color: var(--black);
}

.download-button {
    display: inline-block;
    background-color: #FFD700; /* žltá */
    color: black;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.download-button:hover {
    background-color: #FFC300; /* tmavšia žltá */
    transform: scale(1.05);
}


@media (max-width: 768px) {
    .terms-container {
        margin: 1rem;
        padding: 1rem;
    }

    .tos-section {
        margin: 1.5rem 0;
    }

    .tos-section h4 {
        font-size: 1.1rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        padding: 0.25rem;
    }

    .main-nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .main-nav li {
        margin: 0.125rem;
    }

    .main-nav a {
        padding: 0.35rem 0.75rem;
        font-size: 0.875rem;
    }

    .hero {
        padding: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .credits-container {
        padding: 1rem;
    }

    .tech-stack {
        grid-template-columns: 1fr;
    }

    .timeline-dots {
        margin: 0 10px;
    }

    .label {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        text-align: right;
        margin: 12px 0 0 0;
        min-height: 60px;
    }
}

/* Tablet Specific Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-nav ul {
        justify-content: center;
        padding: 0.75rem;
    }

    .timeline-dots {
        margin: 0 30px;
    }

    .tech-stack {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .main-nav {
        position: absolute;
    }

    section {
        min-height: auto;
        padding: 1rem;
    }

    .hero {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 2rem;
        text-align: left;
        align-items: center;
    }

    .logo-container {
        width: min(150px, 30vh);
        height: min(150px, 30vh);
        margin: 0;
    }

    .benefits {
        margin-top: 1rem;
    }

    .timeline {
        padding: 20px 0;
    }
}

/* High-DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .main-nav {
        backdrop-filter: blur(10px);
    }
}

/* Ensure content is readable on very small devices */
@media (max-width: 320px) {
    .main-nav a {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .dot {
        width: 16px;
        height: 16px;
    }

    .label {
        font-size: 10px;
    }
}