/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    text-align: center;
}

.section-description {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.logo {
    width: 32px;
    height: 32px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.navbar-actions {
    display: flex;
    align-items: center;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    background: transparent;
    border: 2px solid #333;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.github-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #333;
    transition: left 0.3s ease;
    z-index: -1;
}

.github-link:hover::before {
    left: 0;
}

.github-link:hover {
    color: white;
    border-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.github-link i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.github-link:hover i {
    transform: scale(1.1);
}

.github-text {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.hero-description {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-screenshot {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    color: #667eea;
}

.card-1 {
    top: 20%;
    left: -10%;
    animation-delay: 0s;
}

.card-2 {
    top: 60%;
    right: -10%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 20%;
    left: -5%;
    animation-delay: 4s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(102, 126, 234, 0.05),
        transparent
    );
    transition: left 0.6s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots {
    padding: 5rem 0;
    background: #f8f9fa;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.screenshot-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.screenshot-item:hover {
    transform: translateY(-10px);
}

.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    background: #fff;
}

.screenshot-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.screenshot-item:hover .screenshot-overlay {
    transform: translateY(0);
}

.screenshot-overlay h4 {
    margin-bottom: 0.5rem;
}

/* Download Section */
.download {
    padding: 5rem 0;
    background: #fff;
}

.version-info {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.download-card {
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.download-card.featured {
    border-color: #667eea;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.download-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.download-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.download-description {
    color: #666;
    margin-bottom: 0.5rem;
}

.download-size {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.download-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.download-options {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.download-option {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.download-option:hover {
    color: #764ba2;
}

.installation-help {
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.help-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.help-section summary {
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.help-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.help-item {
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.help-item code {
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* About Section */
.about {
    padding: 5rem 0;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .section-title {
    text-align: left;
}

.about-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.about-stat h4 {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.about-stat p {
    color: #666;
    font-size: 0.95rem;
}

.tech-stack h4 {
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    background: #667eea;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-img {
    max-width: 100%;
    height: auto;
}

/* FAQ Section */
.faq {
    padding: 5rem 0;
    background: #fff;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #f0f0f0;
}

.faq-question {
    width: 100%;
    padding: 1.5rem 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: #667eea;
}

.faq-question[aria-expanded='true'] i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 0 1.5rem 0;
    color: #666;
    line-height: 1.6;
    display: none;
}

.faq-answer.active {
    display: block;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 1rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

.footer-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-description {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 400px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #fff;
    font-weight: 600;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #667eea;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.footer-links a::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-links a:hover {
    color: #667eea;
    transform: translateX(8px);
}

.footer-bottom {
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

.footer-copyright {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer-academic {
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    color: #1a1a1a;
}

.modal-description {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.modal-download-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.download-file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.file-name {
    font-weight: 600;
    color: #1a1a1a;
}

.file-size {
    color: #888;
    font-size: 0.9rem;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.download-link:hover {
    background: #5a6fd8;
}

.modal-help h4 {
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.help-list {
    list-style: none;
    padding-left: 0;
}

.help-list li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.help-list li::before {
    content: '•';
    color: #667eea;
    position: absolute;
    left: 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navigation */
    .navbar-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #f0f0f0;
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        flex-direction: column;
        gap: 1.5rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .navbar-actions {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #f0f0f0;
    }

    .github-link {
        width: 100%;
        max-width: 200px;
        justify-content: center;
        padding: 12px 20px;
        font-size: 1rem;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .navbar-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .floating-card {
        position: static;
        margin: 0.5rem;
        animation: none;
    }

    /* Sections */
    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .screenshot-gallery {
        grid-template-columns: 1fr;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-text .section-title {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .version-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Modal */
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .download-file-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Print Styles */
@media print {
    .header,
    .back-to-top,
    .modal {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .hero,
    .features,
    .download,
    .about {
        page-break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }

    .btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }

    .feature-icon {
        background: #000;
    }

    .download-btn {
        background: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-card {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}
