:root {
    --bs-body-bg: #0d1117;
    --bs-body-color: #c9d1d9;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-orange: #fb8500;
}

* { --mermaid-font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Navigation */
.navbar {
    background: linear-gradient(90deg, #0d1117 0%, #161b22 100%);
    border-bottom: 1px solid #30363d;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: #8b949e !important;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-blue) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
}

/* Section */
.section {
    padding: 80px 0;
    border-bottom: 1px solid #30363d;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 50px;
    color: #c9d1d9;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Mermaid Diagrams */
.diagram-container {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    overflow-x: auto;
}

.mermaid {
    display: flex;
    justify-content: center;
}

.mermaid svg {
    max-width: 100%;
    height: auto;
}

/* Cards */
.component-card {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 250px;
}

.component-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.component-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 8px 32px rgba(88, 166, 255, 0.15);
    transform: translateY(-5px);
}

.component-card:hover::before {
    opacity: 1;
}

.component-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.component-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #c9d1d9;
}

.component-desc {
    color: #8b949e;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Stats */
.stat-box {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: var(--accent-green);
    box-shadow: 0 8px 32px rgba(63, 185, 80, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    color: #8b949e;
    font-size: 0.9rem;
}

/* Table */
.table-dark {
    border-color: #30363d;
}

.table-dark th,
.table-dark td {
    border-color: #30363d;
    padding: 15px;
}

.table-dark th {
    background: #161b22;
    font-weight: 700;
    color: var(--accent-blue);
}

.table-dark tbody tr:hover {
    background-color: #161b22;
}

/* Badges */
.badge-primary {
    background: rgba(31, 111, 235, 0.2);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.badge-success {
    background: rgba(63, 185, 80, 0.2);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.badge-warning {
    background: rgba(251, 133, 0, 0.2);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
}

.badge-info {
    background: rgba(88, 166, 255, 0.2);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.badge-light {
    background: rgba(139, 148, 158, 0.2);
    color: #8b949e;
    border: 1px solid #8b949e;
}

.badge-secondary {
    background: rgba(88, 166, 255, 0.2);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

/* Footer */
footer {
    background: #010409;
    border-top: 1px solid #30363d;
    padding: 40px 0;
    margin-top: 80px;
}

.footer-link {
    color: #8b949e;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--accent-blue);
}

/* Tech Badge */
.tech-badge {
    display: inline-block;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 4px 4px 4px 0;
    margin-top: 15px;
}

/* Flow Item */
.flow-item {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    border-left: 4px solid var(--accent-blue);
}

.flow-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    margin-right: 15px;
}

.flow-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #c9d1d9;
    margin-bottom: 5px;
}

.flow-desc {
    color: #8b949e;
    margin-left: 47px;
    margin-top: -25px;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }

    .section {
        padding: 40px 0;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8b949e;
}
