/* VS Code Dark Theme Colors */
:root {
    --vscode-bg: #1e1e1e;
    --vscode-editor: #1e1e1e;
    --vscode-sidebar: #252526;
    --vscode-activitybar: #333333;
    --vscode-titlebar: #3c3c3c;
    --vscode-statusbar: #007acc;
    --vscode-border: #3c3c3c;
    --vscode-text: #d4d4d4;
    --vscode-text-muted: #858585;
    --vscode-hover: #2a2d2e;
    --vscode-active: #37373d;
    --vscode-selection: #264f78;
}

/* Tailwind Config Extension */
.bg-vscode-bg { background-color: var(--vscode-bg); }
.bg-vscode-editor { background-color: var(--vscode-editor); }
.bg-vscode-sidebar { background-color: var(--vscode-sidebar); }
.bg-vscode-activitybar { background-color: var(--vscode-activitybar); }
.bg-vscode-titlebar { background-color: var(--vscode-titlebar); }
.bg-vscode-statusbar { background-color: var(--vscode-statusbar); }
.bg-vscode-hover { background-color: var(--vscode-hover); }
.bg-vscode-active { background-color: var(--vscode-active); }
.border-vscode-border { border-color: var(--vscode-border); }
.text-vscode-text { color: var(--vscode-text); }
.text-vscode-text-muted { color: var(--vscode-text-muted); }

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

::-webkit-scrollbar-track {
    background: var(--vscode-editor);
}

::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Explorer Sidebar Panel */
.sidebar-panel {
    width: 256px;
    background-color: var(--vscode-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--vscode-border);
    flex-shrink: 0;
    position: relative;
    transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar-panel.collapsed {
    transform: translateX(-100%);
    width: 0;
    overflow: hidden;
}

/* Mobile Sidebar */
@media (max-width: 767px) {
    .sidebar-panel {
        position: fixed;
        top: 40px;
        left: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        margin-left: 0 !important;
        width: 75vw !important;
        max-width: 280px;
    }

    .sidebar-panel.open {
        transform: translateX(0);
    }

    .sidebar-panel.collapsed {
        transform: translateX(-100%);
    }
}

/* Sidebar */
.sidebar-section {
    margin-bottom: 2px;
}

.folder-header {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s;
}

.folder-header:hover {
    background-color: var(--vscode-hover);
}

.folder-content {
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

.folder-content.collapsed {
    max-height: 0 !important;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 4px 8px 4px 24px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.1s;
}

.file-item:hover {
    background-color: var(--vscode-hover);
}

.file-item.active {
    background-color: var(--vscode-active);
}

/* Tabs Wrapper */
.tabs-wrapper {
    min-height: 36px;
    background-color: var(--vscode-sidebar);
    border-bottom: 1px solid var(--vscode-border);
}

.tabs-scroll-container {
    display: flex;
    flex-wrap: wrap;
}

/* Tabs */
.tab {
    display: flex;
    align-items: center;
    padding: 0 10px;
    height: 36px;
    background-color: var(--vscode-sidebar);
    border-right: 1px solid var(--vscode-border);
    border-bottom: 1px solid var(--vscode-border);
    font-size: 13px;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .tab {
        height: 38px;
        padding: 0 8px;
        font-size: 12px;
    }
}

.tab:hover {
    background-color: var(--vscode-hover);
}

.tab.active {
    background-color: var(--vscode-editor);
}

.tab.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--vscode-statusbar);
}

.tab .tab-close {
    margin-left: 6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s, background-color 0.15s;
    border-radius: 4px;
    flex-shrink: 0;
}

.tab:hover .tab-close,
.tab.active .tab-close {
    opacity: 0.7;
}

.tab .tab-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Mobile: Always show close button for touch */
@media (max-width: 767px) {
    .tab .tab-close {
        opacity: 0.6;
        width: 24px;
        height: 24px;
    }

    .tab .tab-close:active {
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.2);
    }
}

/* Content Page */
.content-page {
    min-height: 100%;
    background: linear-gradient(180deg, var(--vscode-editor) 0%, #1a1a2e 100%);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slideUp {
    opacity: 0;
    animation: slideUp 0.5s ease-out forwards;
}

.cursor {
    animation: blink 1s infinite;
}

/* Feature Cards */
.feature-card {
    background: linear-gradient(145deg, #2a2a3a 0%, #252530 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.card-arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    color: var(--vscode-statusbar);
}

.feature-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Tech Badge */
.tech-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s;
}

.tech-badge:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Info Card */
.info-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.info-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Code Block */
.code-block {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.code-header {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-body {
    padding: 16px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
}

/* Stat Card */
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

/* Mini Stat */
.mini-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 24px;
}

/* Methodology Grid */
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 640px) {
    .methodology-grid {
        grid-template-columns: 1fr;
    }
}

.method-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}

.method-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.method-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin: 0 auto 16px;
}

.method-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.method-card p {
    font-size: 13px;
    color: var(--vscode-text-muted);
}

/* Culture Timeline */
.culture-timeline {
    position: relative;
    padding-left: 30px;
}

.culture-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6, #ec4899);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 4px;
    width: 14px;
    height: 14px;
    background: var(--vscode-editor);
    border: 3px solid #3b82f6;
    border-radius: 50%;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.05);
}

.timeline-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 14px;
    color: var(--vscode-text-muted);
}

/* Demo Styles */
.demo-header {
    text-align: center;
    margin-bottom: 32px;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
}

.demo-showcase {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.demo-image-wrapper {
    position: relative;
    overflow: hidden;
}

.demo-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.demo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.demo-image-wrapper:hover .demo-overlay {
    opacity: 1;
}

.demo-image-wrapper:hover .demo-image {
    transform: scale(1.05);
}

.overlay-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    background: var(--vscode-statusbar);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.overlay-btn:hover {
    background: #005a9e;
    transform: scale(1.05);
}

.demo-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.demo-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
}

.demo-feature i {
    font-size: 18px;
}

/* Demo Link Button */
.demo-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--vscode-statusbar);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.demo-link:hover {
    background: #005a9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 122, 204, 0.4);
}

/* Typing Effect */
.typing-effect {
    min-height: 28px;
}

/* Mobile File Item */
@media (max-width: 767px) {
    .file-item {
        padding: 10px 8px 10px 24px;
        font-size: 14px;
    }

    .folder-header {
        padding: 10px 8px;
    }
}

/* Mobile Content Adjustments */
@media (max-width: 767px) {
    .content-page {
        padding: 16px !important;
    }

    .content-page h1 {
        font-size: 1.5rem !important;
    }

    .content-page h2 {
        font-size: 1.25rem !important;
    }

    .hero-section h1 {
        font-size: 2rem !important;
    }

    .feature-card {
        padding: 16px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .tech-badge {
        padding: 6px 12px;
        font-size: 12px;
    }

    .demo-features {
        gap: 12px;
    }

    .demo-feature {
        padding: 10px 14px;
        font-size: 12px;
    }

    .demo-feature i {
        font-size: 14px;
    }

    .stat-card {
        padding: 14px;
    }

    .method-card {
        padding: 16px;
    }

    .method-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .method-card h3 {
        font-size: 15px;
    }

    .info-card {
        padding: 14px;
        gap: 12px;
    }

    .info-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .timeline-content {
        padding: 14px;
    }

    .code-body {
        font-size: 11px;
        padding: 12px;
    }

    .demo-link {
        padding: 10px 18px;
        font-size: 13px;
    }

    .overlay-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Responsive Grid Fixes */
@media (max-width: 640px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .mini-stat {
        padding: 12px;
    }

    .mini-stat .text-2xl {
        font-size: 1rem;
    }
}

/* Footer */
.content-footer {
    margin-top: 60px;
    padding: 24px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--vscode-text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--vscode-statusbar);
}

.footer-link i {
    font-size: 16px;
}

.footer-copyright {
    text-align: center;
    color: var(--vscode-text-muted);
    font-size: 12px;
    opacity: 0.7;
}

@media (max-width: 767px) {
    .content-footer {
        margin-top: 40px;
        padding: 20px 15px;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .footer-link {
        font-size: 12px;
    }

    .footer-copyright {
        font-size: 11px;
    }
}

/* Tech News Section */
.tech-news-section {
    max-width: 900px;
    margin: 0 auto;
}

.tech-news-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-news-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.tech-news-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-news-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateX(4px);
}

.tech-news-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.tech-news-content {
    flex: 1;
    min-width: 0;
}

.tech-news-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tech-news-summary {
    font-size: 12px;
    color: var(--vscode-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tech-news-date {
    font-size: 11px;
    color: var(--vscode-text-muted);
    opacity: 0.7;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tech-news-date i {
    font-size: 10px;
}

.tech-news-arrow {
    color: var(--vscode-text-muted);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.tech-news-card:hover .tech-news-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--vscode-statusbar);
}

@media (max-width: 767px) {
    .tech-news-card {
        padding: 14px 16px;
        gap: 12px;
    }

    .tech-news-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .tech-news-title {
        font-size: 13px;
    }

    .tech-news-summary {
        font-size: 11px;
        -webkit-line-clamp: 1;
    }

    .tech-news-arrow {
        display: none;
    }
}
