/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background-color: #0f172a;
}

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

/* Header Styles */
.header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo {
    height: 40px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #03a1fc;
    margin: 0;
}

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

.nav-link {
    text-decoration: none;
    color: #94a3b8;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: #03a1fc;
    background: #334155;
    border-color: #475569;
}

.community-link {
    background: #03a1fc;
    color: white !important;
    border: 1px solid #03a1fc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.community-link:hover {
    background: #0284c7;
    color: white !important;
    border-color: #0284c7;
}

.discord-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* Main Content */
.main {
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #03a1fc;
    color: white;
}

.btn-primary:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #03a1fc;
    border: 2px solid #03a1fc;
}

.btn-secondary:hover {
    background: #03a1fc;
    color: white;
    transform: translateY(-2px);
}

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

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Table of Contents */
.toc-section {
    margin-bottom: 4rem;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.toc-item {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #334155;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toc-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toc-item.coming-soon {
    opacity: 0.7;
    background: #334155;
}

.toc-number {
    font-size: 2rem;
    font-weight: 700;
    color: #03a1fc;
    margin-bottom: 1rem;
}

.toc-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 1rem;
}

.toc-content p {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.toc-link {
    color: #03a1fc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.toc-link:hover {
    color: #0284c7;
}

.toc-link.disabled {
    color: #64748b;
    cursor: not-allowed;
}

/* Features Section */
.features-section {
    margin-bottom: 4rem;
}

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

.feature-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid #334155;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #cbd5e1;
    line-height: 1.6;
}

/* Tutorial Section Styles */
.tutorial-section {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 2rem;
    border-bottom: 3px solid #03a1fc;
    padding-bottom: 0.5rem;
}

/* Content Row Layout */
.content-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 2rem;
}

.content-row.reverse {
    direction: rtl;
}

.content-row.reverse > * {
    direction: ltr;
}

/* Left Column Layout */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Additional Content Section */
.additional-content {
    background: #334155;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #475569;
}

.additional-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 1rem;
    border-bottom: 2px solid #03a1fc;
    padding-bottom: 0.5rem;
}

.tip-box {
    background: #1e293b;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #03a1fc;
    transition: transform 0.2s ease;
}

.tip-box:hover {
    transform: translateX(4px);
}

.tip-box:last-child {
    margin-bottom: 0;
}

.tip-box h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #03a1fc;
    margin-bottom: 0.5rem;
}

.tip-box p {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.external-link {
    color: #03a1fc;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.external-link:hover {
    color: #0284c7;
    border-bottom-color: #0284c7;
}

/* Image Container */
.image-container {
    position: relative;
}

.tutorial-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.tutorial-image:hover {
    transform: scale(1.02);
}

.image-caption {
    margin-top: 1rem;
    padding: 1rem;
    background: #334155;
    border-radius: 6px;
    border-left: 4px solid #03a1fc;
}

.image-caption p {
    font-size: 0.9rem;
    color: #94a3b8;
    font-style: italic;
    margin: 0;
}

/* Text Content */
.text-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 1rem;
}

.text-content p {
    margin-bottom: 1rem;
    color: #cbd5e1;
    font-size: 1rem;
}

.highlight-box {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.highlight-box strong {
    color: #60a5fa;
}

.feature-list {
    list-style: none;
    margin: 1rem 0;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #4b5563;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Property Grid Styles */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.property-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #334155;
    border-radius: 8px;
    border: 1px solid #475569;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.property-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: #03a1fc;
}

.property-name {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #0f172a;
    color: #03a1fc;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #334155;
    text-align: center;
}

.property-meaning {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
}

/* Code Section */
.code-section {
    margin-top: 2rem;
}

.code-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 1rem;
}

.code-block {
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid #334155;
}

.code-header {
    background: #1e293b;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.code-title {
    color: #e2e8f0;
    font-weight: 500;
    font-size: 0.9rem;
}

.copy-btn {
    background: #03a1fc;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.copy-btn:hover {
    background: #0284c7;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Syntax highlighting for different languages */
.language-html {
    color: #e2e8f0;
}

.language-javascript {
    color: #e2e8f0;
}

.language-css {
    color: #e2e8f0;
}

.language-lua {
    color: #e2e8f0;
}

/* Luau/Lua specific syntax highlighting */
.language-lua .comment {
    color: #64748b;
    font-style: italic;
}

.language-lua .keyword {
    color: #f472b6;
    font-weight: bold;
}

.language-lua .string {
    color: #10b981;
}

.language-lua .number {
    color: #f59e0b;
}

.language-lua .function {
    color: #3b82f6;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.resource-card {
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.resource-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.resource-card p {
    color: #94a3b8;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.resource-link {
    color: #03a1fc;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.resource-link:hover {
    color: #0284c7;
}

/* Chapter Navigation */
.chapter-nav {
    background: #1e293b;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
    padding: 2rem 0;
    margin-top: 3rem;
}

.chapter-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-arrow {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #334155;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid #475569;
}

.nav-arrow:hover {
    background: #03a1fc;
    color: white;
    transform: translateY(-2px);
}

.chapter-info {
    text-align: center;
    flex: 1;
}

.chapter-number {
    display: block;
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.chapter-title {
    display: block;
    font-size: 1.25rem;
    color: #f1f5f9;
    font-weight: 600;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 2rem 0;
    border-top: 1px solid #334155;
}

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

.footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 30px;
    width: auto;
}

.footer-left p {
    margin: 0;
    color: #94a3b8;
}

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

.footer-link {
    color: #03a1fc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #0284c7;
}

.footer-copyright {
    margin: 0;
    font-size: 0.9rem;
    text-align: center;
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo-container {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .chapter-nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .content-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .content-row.reverse {
        direction: ltr;
    }
    
    .left-column {
        gap: 1.5rem;
    }
    
    .additional-content {
        padding: 1rem;
    }
    
    .tutorial-section {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .property-grid {
        grid-template-columns: 1fr;
    }
    
    .code-block pre {
        padding: 1rem;
    }
    
    .code-block code {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 1rem 0;
    }
    
    .tutorial-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .copy-btn {
        display: none;
    }
    
    .tutorial-section {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .code-block {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

