/* Notations Documentation Styles */

:root {
    --primary-color: #2c5282;
    --secondary-color: #4a5568;
    --accent-color: #d69e2e;
    --text-color: #1a202c;
    --text-light: #718096;
    --bg-color: #ffffff;
    --bg-light: #f7fafc;
    --border-color: #e2e8f0;
    --code-bg: #2d3748;
    --code-color: #e2e8f0;
    --link-color: #3182ce;
    --link-hover: #2c5282;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Header */
.site-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    height: 32px;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: block;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Dropdown Navigation */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1000;
    margin-top: 0.5rem;
}

.nav-item:hover .nav-dropdown {
    display: block;
}

.nav-dropdown .dropdown-item,
.nav-dropdown a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: block;
    transition: background-color 0.2s;
}

.nav-dropdown .dropdown-item:hover,
.nav-dropdown a:hover {
    background-color: var(--bg-light);
}

/* Page Container */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.section-nav h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.section-nav ul {
    list-style: none;
}

.section-nav li {
    margin-bottom: 0.5rem;
}

.section-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    display: block;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.section-nav a:hover {
    background-color: var(--bg-light);
}

/* Main Content */
.main-content {
    min-width: 0;
}

.content {
    max-width: 800px;
}

.content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.content h2 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.content h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content p {
    margin-bottom: 1rem;
}

.content a {
    color: var(--link-color);
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-light);
}

/* Code */
pre, code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

code {
    background-color: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

pre {
    background-color: var(--code-bg);
    color: var(--code-color);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

pre code {
    background: none;
    padding: 0;
}

/* Notation Blocks */
.notation-container {
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.notation-caption {
    background-color: var(--bg-light);
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.notation-source {
    background-color: var(--code-bg);
    color: var(--code-color);
    padding: 1rem;
    font-family: monospace;
    overflow-x: auto;
}

.notation-view {
    padding: 1rem;
    background-color: white;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--link-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

/* Feature Cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-light);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #cbd5e0;
}

/* Homepage Styles */
.home-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.home-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
}

.quick-example {
    margin: 3rem 0;
}

.quick-example h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.quick-example > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.quick-example .note {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.sections-grid {
    margin: 4rem 0;
}

.sections-grid h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.section-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.section-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
}

.section-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.section-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.community {
    margin: 4rem 0;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.community h2 {
    margin-bottom: 1rem;
}

.community ul {
    list-style: none;
    padding: 0;
}

.community li {
    margin-bottom: 0.5rem;
}

/* Notation Blocks (Interactive Examples) */
.notationBlockRoot {
    margin: 2rem 0;
}

.notation-container {
    margin-bottom: 1rem;
}

.notation-caption {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.notation-source {
    background-color: var(--code-bg);
    color: var(--code-color);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.notation-source-pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.notation-view {
    background-color: white;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow-x: auto;
}

.notation-table {
    border-collapse: collapse;
    margin: 0 auto;
}

.notation-table td {
    padding: 0.5rem;
    border: 1px solid #ddd;
    text-align: center;
}

/* NotationBlock - Copy and Edit Features */
.notation-source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.notation-source-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.notation-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--code-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.notation-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.notation-btn svg {
    flex-shrink: 0;
}

.notation-edit-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    background-color: var(--code-bg);
    color: var(--code-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    resize: vertical;
    line-height: 1.5;
}

.notation-edit-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.notation-edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.notation-apply-btn {
    background-color: #48bb78;
    color: white;
    border-color: #48bb78;
}

.notation-apply-btn:hover {
    background-color: #38a169;
    border-color: #38a169;
}

.notation-cancel-btn {
    background-color: #718096;
    color: white;
    border-color: #718096;
}

.notation-cancel-btn:hover {
    background-color: #4a5568;
    border-color: #4a5568;
}

.notation-source-block {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .notation-btn-text {
        display: none;
    }

    .notation-btn {
        padding: 0.4rem 0.5rem;
    }
}
