/* ====== RESET & BASE ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8f6fa;
    color: #2d1b3d;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ====== SKIP LINK ====== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffb300;
    color: #2d1b3d;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* ====== BUTTONS ====== */
.btn-primary {
    display: inline-block;
    background: #ffb300;
    color: #2d1b3d;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 40px;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(255, 179, 0, 0.35);
    text-align: center;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #e6a100;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 179, 0, 0.4);
}

.btn-outline {
    display: inline-block;
    background: transparent;
    color: #4a235a;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 40px;
    border: 2px solid #4a235a;
    transition: all 0.25s ease;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: center;
}

.btn-outline:hover,
.btn-outline:focus {
    background: #4a235a;
    color: #fff;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2d1b3d;
    color: #fff;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(45, 27, 61, 0.3);
}

.btn-copy:hover {
    background: #1f0f2d;
    transform: translateY(-2px);
}

.btn-copy.copied {
    background: #4caf50;
}

/* ====== HEADER ====== */
header {
    background: #2d1b3d;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(45, 27, 61, 0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i,
.logo span {
    color: #ffb300;
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

nav a:hover,
nav a:focus,
nav a.active {
    color: #ffb300;
}

nav a.active {
    border-bottom: 2px solid #ffb300;
    padding-bottom: 4px;
}

nav a.btn-primary {
    color: #2d1b3d;
    border-bottom: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ====== BREADCRUMB ====== */
.breadcrumb {
    background: #fff;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #888;
}

.breadcrumb a {
    color: #4a235a;
    font-weight: 500;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb .current {
    color: #2d1b3d;
    font-weight: 600;
}

/* ====== COMPONENT DETAIL ====== */
.component-detail {
    padding: 40px 0 60px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.preview-container {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(45, 27, 61, 0.06);
    border: 1px solid rgba(0,0,0,0.02);
    position: sticky;
    top: 100px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.badge-row span {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    background: #f0ecf5;
    color: #666;
}

.badge-row span.ready {
    background: rgba(76,175,80,.12);
    color: #4caf50;
}

.badge-row span.popular {
    background: rgba(255,179,0,.15);
    color: #b87a00;
}

/* ====== SIDEBAR PREVIEW ====== */
.sidebar-preview {
    background: #141f30;
    border-radius: 16px;
    padding: 20px 16px;
    min-height: 380px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0 16px 8px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    margin-bottom: 16px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg,#818cf8,#4f46e5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.logo-text {
    color: #f8fafc;
    font-weight: 600;
    font-size: 14px;
    flex: 1;
}

.more-icon {
    color: #64748b;
    letter-spacing: 2px;
}

.section-title {
    color: #64748b;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 0 8px;
    margin-bottom: 8px;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    transition: all .2s ease;
    cursor: pointer;
    position: relative;
}

.nav-item .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    stroke: #64748b;
    stroke-width: 1.7;
    fill: none;
}

.nav-item.active {
    background: rgba(30,41,59,1);
    color: #f8fafc;
}

.nav-item.active svg {
    stroke: #f8fafc;
}

.nav-item:hover:not(.active) {
    background: rgba(255,255,255,.04);
}

.nav-item .badge {
    margin-left: auto;
    background: rgba(99,102,241,.2);
    color: #818cf8;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ====== PREVIEW INFO ====== */
.preview-info {
    margin-top: 20px;
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    padding: 16px 0;
    border-top: 1px solid #f0ecf5;
}

.stat {
    font-size: .85rem;
    color: #666;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

/* ====== COMPONENT INFO ====== */
.component-info h1 {
    font-family: 'Playfair Display',serif;
    font-size: 2.6rem;
    margin-bottom: 4px;
}

.subtitle {
    color: #888;
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.description {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.feature {
    font-size: .9rem;
    color: #555;
    padding: 8px 12px;
    background: #f8f6fa;
    border-radius: 8px;
}

.feature i {
    color: #ffb300;
    margin-right: 8px;
}

.properties {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #f0ecf5;
}

.prop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

.prop {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    padding: 4px 0;
    border-bottom: 1px solid #f8f6fa;
}

/* ====== YAML SECTION ====== */
.yaml-section {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(45,27,61,.06);
    margin-top: 48px;
}

.yaml-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.yaml-code {
    background: #2d1b3d;
    border-radius: 12px;
    padding: 24px;
    overflow: auto;
    max-height: 500px;
}

.yaml-code pre {
    color: #eae5f0;
    font-family: Consolas, Monaco, monospace;
    font-size: .75rem;
    line-height: 1.8;
    white-space: pre;
}

.copy-btn {
    position: sticky;
    top: 0;
    float: right;
    background: rgba(255,255,255,.08);
    border: none;
    color: rgba(255,255,255,.7);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.yaml-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 12px;
}

.info-text {
    font-size: .85rem;
    color: #888;
}

/* ====== TOAST ====== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #2d1b3d;
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all .4s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ====== FOOTER ====== */
footer {
    background: #1f0f2d;
    color: rgba(255,255,255,.7);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col ul {
    list-style: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.06);
    padding-top: 24px;
    text-align: center;
}

/* ====== RESPONSIVE ====== */
@media(max-width:1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .preview-container {
        position: static;
    }
}

@media(max-width:768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    nav.open {
        display: flex;
    }

    .features,
    .prop-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    
    
}