/* Global Styles */
:root {
    --primary-color: #6366F1;
    --primary-dark: #4F46E5;
    --primary-light: #818CF8;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --dark: #0F172A;
    --dark-secondary: #1E293B;
    --gray-dark: #475569;
    --gray: #64748B;
    --gray-light: #94A3B8;
    --gray-lighter: #CBD5E1;
    --gray-lightest: #F1F5F9;
    --white: #FFFFFF;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(241,245,249,0.95) 100%);
    z-index: -1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--gray-dark);
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--gray-lighter);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo .material-icons-round {
    font-size: 2.5rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.logo p {
    font-size: 0.875rem;
    color: var(--gray);
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--gray-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--gray-lightest);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-xl);
    transition: right 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-lighter);
}

.close-menu {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
}

.mobile-nav {
    padding: 1rem;
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    color: var(--dark);
    border-radius: var(--border-radius-sm);
    transition: background 0.3s ease;
}

.mobile-nav-link:hover {
    background: var(--gray-lightest);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--gray-dark);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn .material-icons-round {
    font-size: 1.25rem;
}

/* Code Window */
.code-window {
    background: var(--dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.code-header {
    background: var(--dark-secondary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.code-title {
    margin-left: auto;
    color: var(--gray-light);
    font-size: 0.875rem;
}

.code-window pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-window code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: white;
    border-radius: var(--border-radius-lg);
    margin: 2rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--gray-lightest);
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon .material-icons-round {
    font-size: 1.75rem;
    color: white;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

/* Quick Start */
.quickstart {
    padding: 4rem 0;
}

.steps {
    display: grid;
    gap: 2rem;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.step-content h3 {
    margin-bottom: 1rem;
}

.step-content pre {
    background: var(--dark);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    overflow-x: auto;
}

.step-content code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: #e2e8f0;
}

/* Documentation Section */
.documentation {
    padding: 4rem 0;
    background: white;
    border-radius: var(--border-radius-lg);
    margin: 2rem 0;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.doc-card {
    background: linear-gradient(135deg, var(--gray-lightest), white);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-lighter);
    cursor: pointer;
    transition: all 0.3s ease;
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.doc-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.doc-icon .material-icons-round {
    color: white;
    font-size: 1.5rem;
}

.doc-card h3 {
    margin-bottom: 0.5rem;
}

.doc-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
}

/* Examples Section */
.examples {
    padding: 4rem 0;
}

.example-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--border-radius-sm);
    color: var(--gray-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.tab-btn .material-icons-round {
    font-size: 1.25rem;
}

.example-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.example-panel {
    display: none;
}

.example-panel.active {
    display: block;
}

.example-panel h3 {
    margin-bottom: 0.5rem;
}

.example-panel p {
    margin-bottom: 1.5rem;
}

.example-panel pre {
    background: var(--dark);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    overflow-x: auto;
}

/* Tools Section */
.tools {
    padding: 4rem 0;
    background: white;
    border-radius: var(--border-radius-lg);
    margin: 2rem 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--gray-lightest);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-lighter);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-header .material-icons-round {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.tool-card h3 {
    margin: 0;
}

.tool-card pre {
    background: var(--dark);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    margin-top: 1rem;
    overflow-x: auto;
}

.tool-card code {
    font-size: 0.8rem;
}

/* Error Codes Section */
.error-codes {
    padding: 4rem 0;
}

.error-table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.error-table table {
    width: 100%;
    border-collapse: collapse;
}

.error-table th {
    background: var(--gray-lightest);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--gray-lighter);
}

.error-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-lighter);
}

.error-table code {
    background: var(--dark);
    color: var(--primary-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* Download Section */
.download {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--border-radius-lg);
    margin: 2rem 0;
}

.download-content {
    text-align: center;
    color: white;
}

.download-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.download-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.download .btn-primary {
    background: white;
    color: var(--primary-color);
}

.download .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.download .btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* Footer */
.footer {
    padding: 3rem 0 1rem;
    background: var(--dark);
    color: white;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--gray-light);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    color: var(--gray-light);
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: var(--gray-light);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-lighter);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-text h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .feature-grid,
    .doc-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .example-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 150px;
    }
    
    .step {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-text h2 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .header,
    .hero-buttons,
    .menu-toggle,
    .download,
    .footer {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .modal {
        position: static;
        display: block;
        background: none;
        padding: 0;
    }
}