/* Import Tailwind CSS */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* Custom CSS Variables */
:root {
    --primary-color: #1e40af;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Advanced Content Components */

/* Video Component */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 2rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-container video,
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Audio Component */
.audio-player {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.audio-player audio {
    width: 100%;
    height: 3rem;
}

.audio-info {
    margin-bottom: 1rem;
}

.audio-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.audio-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Chart Component */
.chart-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Code Component */
.code-block {
    background: #1f2937;
    color: #f9fafb;
    border-radius: 0.5rem;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-header {
    background: #374151;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #4b5563;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-language {
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 500;
}

.code-copy-btn {
    background: #4b5563;
    color: #f9fafb;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.code-copy-btn:hover {
    background: #6b7280;
}

.code-content {
    padding: 1.5rem;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Table Component */
.table-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table th {
    background: var(--bg-secondary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-light);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: var(--bg-secondary);
}

/* Interactive Elements */
.interactive-demo {
    background: var(--bg-primary);
    border: 2px dashed var(--border-light);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.demo-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0.5rem;
}

.demo-button:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Callout Boxes */
.callout {
    border-left: 4px solid;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    background: var(--bg-primary);
}

.callout.info {
    border-color: #3b82f6;
    background: #eff6ff;
}

.callout.warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.callout.success {
    border-color: #10b981;
    background: #ecfdf5;
}

.callout.danger {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Quote Styles */
.pull-quote {
    background: var(--bg-primary);
    border-left: 4px solid var(--accent-color);
    padding: 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.6;
    border-radius: 0 0.5rem 0.5rem 0;
    box-shadow: var(--shadow-sm);
}

.pull-quote-author {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

/* Navigation Enhancements */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    background: var(--bg-primary);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
    z-index: 1000;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-content a {
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease;
}

.nav-dropdown-content a:hover {
    background: var(--bg-secondary);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    transform: scale(1.05);
}

/* Dark Mode Styles */
[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --border-light: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .code-content {
        padding: 1rem;
    }
    
    .chart-wrapper {
        height: 300px;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

