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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #0a0a0a;
    color: #fafafa;
    line-height: 1.6;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #09090b;
    border-right: 1px solid #27272a;
    padding: 1.5rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.nav-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid #27272a;
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fafafa;
    text-decoration: none;
}

.nav-section h3 {
    padding: 0 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #a1a1aa;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.nav-section li a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: #a1a1aa;
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 0.375rem;
    margin: 0 0.75rem;
}

.nav-section li a:hover {
    color: #fafafa;
    background: #18181b;
}

.nav-section li a.active {
    color: #fafafa;
    background: #3860b2;
}

.nav-section li a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-header .tagline {
    font-size: 0.75rem;
    color: #71717a;
    margin-top: 0.25rem;
}

.content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    max-width: calc(100vw - 250px);
}

.section {
    margin-bottom: 4rem;
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section > p {
    color: #a1a1aa;
    margin-bottom: 2rem;
}

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

.feature-card {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.feature-card p {
    color: #a1a1aa;
}

.component-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.component-item {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.component-item:hover {
    border-color: #3f3f46;
    transform: translateY(-2px);
}

.component-preview {
    padding: 3rem 2rem;
    background: #18181b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #27272a;
    min-height: 120px;
    position: relative;
}

.component-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #3860b2;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.component-badge.new {
    background: #22c55e;
}

.component-badge.pro {
    background: #f59e0b;
}

.component-details {
    padding: 1.5rem;
}

.component-details h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.component-details p {
    color: #a1a1aa;
    margin-bottom: 1rem;
}

.component-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    background: #18181b;
    border: 1px solid #27272a;
    color: #fafafa;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #27272a;
}

.code-block {
    background: #0a0a0a;
    border: 1px solid #27272a;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
}

.code-block.hidden {
    display: none;
}

.code-block pre {
    color: #fafafa;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #27272a;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #fafafa;
}

.modal-body {
    padding: 1.5rem;
}

.component-preview-large {
    padding: 4rem 2rem;
    background: #18181b;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* YAML Syntax Highlighting */
.yaml-key {
    color: #7dd3fc;
}

.yaml-string {
    color: #86efac;
}

.yaml-value {
    color: #fbbf24;
}

.yaml-comment {
    color: #6b7280;
    font-style: italic;
}

.yaml-operator {
    color: #f472b6;
}

.page-header {
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.125rem;
    color: #a1a1aa;
}

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

.component-card {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s;
}

.component-card:hover {
    border-color: #3f3f46;
}

.component-preview {
    padding: 2rem;
    background: #18181b;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.component-info {
    padding: 1.5rem;
}

.component-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.component-info p {
    color: #a1a1aa;
    margin-bottom: 1rem;
}

.view-component {
    color: #3860b2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.view-component:hover {
    color: #4f7bd4;
}

/* Button Styles for Preview - Matching Power Apps */
.btn {
    padding: 8px 16px;
    border: 1px solid;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    height: 41px;
    min-width: 120px;
}

.btn-primary {
    background: rgb(56, 96, 178);
    color: rgb(255, 255, 255);
    border-color: rgb(47, 82, 151);
    font-family: 'Open Sans', sans-serif;
}

.btn-primary:hover {
    background: rgb(45, 77, 143);
    border-color: rgb(57, 97, 164);
}

.btn-secondary {
    background: rgb(0, 120, 212);
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 0;
    font-family: 'Segoe UI', sans-serif;
}

.btn-secondary:hover {
    background: rgb(16, 110, 190);
}

.btn-modern {
    background: #f3f2f1;
    color: #323130;
    border: 1px solid #8a8886;
    border-radius: 2px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    height: 32px;
    min-width: 80px;
}

.btn-modern:hover {
    background: #edebe9;
    border-color: #323130;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #27272a;
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.tab.active {
    color: #fafafa;
    border-bottom: 2px solid #3860b2;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.code-block {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

.code-block pre {
    color: #fafafa;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}