* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.intro {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
}

.card h2 i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.card-content {
    margin-bottom: 25px;
}

.card-content p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.feature-list {
    list-style-type: none;
    margin-bottom: 20px;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    align-items: flex-start;
}

.feature-list li:before {
    content: '✓';
    color: #2ecc71;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2rem;
}

.example-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
}

.example-section h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.code-block {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 10px 0;
}

.comparison-section {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.comparison-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.comparison-table th {
    background-color: #f1f5f9;
    color: #2c3e50;
    font-weight: bold;
}

.comparison-table tr:hover {
    background-color: #f8fafc;
}

.comparison-table td:first-child {
    font-weight: bold;
    color: #34495e;
}

.use-cases {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.use-cases h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.use-case-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.use-case-item h3 {
    color: #34495e;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.use-case-item p {
    color: #666;
    font-size: 1rem;
}

.visual-example {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    text-align: center;
}

.visual-example h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.data-models {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.data-model {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.data-model h3 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.model-diagram {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sql-diagram table {
    border-collapse: collapse;
    width: 100%;
}

.sql-diagram th,
.sql-diagram td {
    border: 1px solid #34495e;
    padding: 8px 12px;
    text-align: left;
}

/* Animation Styles */
.animation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.animation-speed {
    display: flex;
    align-items: center;
    gap: 10px;
}

#animation-status {
    margin-top: 20px;
    font-style: italic;
    color: #666;
    height: 24px;
}

.hidden {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.sql-animation-container,
.nosql-animation-container {
    min-height: 300px;
    position: relative;
}

.sql-join-animation {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #3498db;
}

.join-lines {
    position: absolute;
    top: 100px;
    left: 50%;
    width: 100%;
    height: 80px;
    pointer-events: none;
    z-index: 1;
}

.join-line {
    position: absolute;
    height: 2px;
    background-color: #e74c3c;
    transform-origin: left center;
}

.json-key {
    color: #c0392b;
}

.json-string {
    color: #27ae60;
}

.json-number {
    color: #2980b9;
}

.json-object,
.json-array {
    color: #f39c12;
}

.sql-diagram th {
    background-color: #34495e;
    color: white;
}

.nosql-diagram .document {
    border: 1px solid #34495e;
    border-radius: 5px;
    padding: 15px;
    text-align: left;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.document pre {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #34495e;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.conclusion {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.conclusion h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.conclusion p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.key-takeaways {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.key-takeaways h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.key-takeaways ul {
    padding-left: 20px;
}

.key-takeaways li {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #ecf0f1;
}

.comparison-highlight {
    background-color: #3498db;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}

.relational-color {
    color: #3498db;
}

.nosql-color {
    color: #e74c3c;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .data-models {
        flex-direction: column;
    }

    h1 {
        font-size: 2rem;
    }

    .card h2 {
        font-size: 1.5rem;
    }
}