:root {
    --primary-color: #3366cc;
    --secondary-color: #6699ff;
    --accent-color: #ff9900;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #212529;
    --border-color: #dee2e6;
}

/* General styles */
body {
    padding-top: 60px;
    scroll-behavior: smooth;
    color: var(--text-color);
    position: relative;
}

section {
    padding-top: 20px;
}

h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

pre {
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

/* Features list */
.feature-list li {
    margin-bottom: 0.8rem;
    list-style-type: none;
}

/* Diagram containers */
.diagram-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background-color: white;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.diagram-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.svg-container {
    width: 100%;
    height: 500px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--light-color);
}

.svg-container svg {
    width: 100%;
    height: 100%;
}

.diagram-controls {
    margin-top: 15px;
    text-align: center;
}

/* Tooltip */
.tooltip-custom {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    pointer-events: none;
    max-width: 300px;
    z-index: 1000;
    display: none;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Tech cards */
.tech-card {
    transition: transform 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.tech-card.backend .card-header {
    background-color: var(--primary-color);
    color: white;
}

.tech-card.frontend .card-header {
    background-color: var(--success-color);
    color: white;
}

.tech-card.infrastructure .card-header {
    background-color: var(--danger-color);
    color: white;
}

.tech-card .card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: white;
}

/* Custom counter */
ol.custom-counter {
    counter-reset: step-counter;
    list-style-type: none;
    padding-left: 0;
}

ol.custom-counter li {
    counter-increment: step-counter;
    margin-bottom: 10px;
    padding-left: 50px;
    position: relative;
}

ol.custom-counter li:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    line-height: 35px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    border-radius: 50%;
}

/* Highlight active path in diagrams */
.highlight-happy-path .happy-path {
    opacity: 1;
}

.highlight-happy-path .sad-path {
    opacity: 0.2;
}

.highlight-sad-path .sad-path {
    opacity: 1;
}

.highlight-sad-path .happy-path {
    opacity: 0.2;
}

/* Override Prism styles */
pre[class*="language-"] {
    margin: 1rem 0;
    border-radius: 6px;
}

:not(pre) > code[class*="language-"], pre[class*="language-"] {
    background: #f8f9fa;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Media queries */
@media (max-width: 768px) {
    .svg-container {
        height: 400px;
    }
    
    .card {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .svg-container {
        height: 300px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}
