/* PugDB Showcase Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --terminal-bg: #1e293b;
    --terminal-green: #10b981;
    --terminal-yellow: #f59e0b;
    --border-color: #334155;
    /* Gold/Amber colors for shortcuts */
    --shortcut-gold: #f59e0b;
    --shortcut-gold-dark: #d97706;
    --shortcut-gold-light: #fbbf24;
    --shortcut-bg: #92400e;
    --shortcut-bg-hover: #b45309;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--terminal-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cta-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.cta-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* Navigation */
.nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    background: var(--terminal-bg);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-btn:hover {
    background: var(--border-color);
    border-color: var(--primary-color);
}

.nav-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Terminal Container */
.terminal-container {
    background: var(--terminal-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    min-height: 400px;
}

#terminal {
    width: 100%;
    height: 400px;
}

/* Demo Info */
.demo-info {
    background: var(--terminal-bg);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

#demo-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--terminal-green);
}

#demo-description {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Showcase */
.showcase {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0; /* Allow flexbox to shrink */
}

/* Command Shortcuts Panel */
.commands-panel {
    width: 300px;
    background: var(--terminal-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 2rem;
    right: 2rem;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, max-height 0.3s ease;
    z-index: 1000;
}

.commands-panel.collapsed {
    width: 80px;
}

.commands-panel.collapsed .commands-content,
.commands-panel.collapsed .commands-header h3 {
    display: none;
}

.commands-panel.collapsed .commands-header {
    justify-content: center;
    padding: 1rem 0.5rem;
    border-bottom: none;
}

.commands-panel.collapsed .toggle-panel {
    display: flex;
    width: 100%;
    height: 40px;
    margin: 0.5rem 0;
}

.commands-panel:not(.collapsed) .commands-collapsed-label {
    display: none;
}

.commands-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.commands-collapsed-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-align: center;
    padding: 1rem 0;
    color: var(--shortcut-gold);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.commands-collapsed-label:hover {
    color: var(--shortcut-gold-light);
}

.commands-header h3 {
    font-size: 1.1rem;
    color: var(--terminal-green);
    margin: 0;
}

.toggle-panel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    padding: 0;
}

.toggle-panel:hover {
    background: var(--border-color);
    border-color: var(--primary-color);
}

.commands-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--shortcut-gold-dark) var(--bg-dark);
}

/* Custom scrollbar styling for commands panel (Webkit browsers) */
.commands-content::-webkit-scrollbar {
    width: 8px;
}

.commands-content::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}

.commands-content::-webkit-scrollbar-thumb {
    background: var(--shortcut-gold-dark);
    border-radius: 4px;
}

.commands-content::-webkit-scrollbar-thumb:hover {
    background: var(--shortcut-gold);
}

.command-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.command-group h4 {
    font-size: 0.85rem;
    color: var(--shortcut-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.cmd-shortcut {
    background: var(--shortcut-bg);
    color: var(--text-light);
    border: 1px solid var(--shortcut-gold-dark);
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    text-align: left;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.cmd-shortcut::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--shortcut-gold);
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cmd-shortcut:hover {
    background: var(--shortcut-bg-hover);
    border-color: var(--shortcut-gold);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.cmd-shortcut:hover::before {
    opacity: 1;
}

.cmd-shortcut:active {
    transform: translateX(2px) scale(0.98);
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .showcase {
        flex-direction: column;
    }
    
    .commands-panel {
        width: 100%;
        position: fixed;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        max-height: 50vh;
        border-radius: 8px 8px 0 0;
        z-index: 1000;
    }
    
    .commands-panel.collapsed {
        width: 100%;
        max-height: 60px;
    }
    
    .commands-panel.collapsed .commands-content {
        display: none;
    }
    
    .commands-panel.collapsed .commands-header h3 {
        display: block;
    }
    
    .commands-panel.collapsed .commands-collapsed-label {
        writing-mode: horizontal-tb;
        padding: 0.5rem;
        text-align: center;
    }
    
    .commands-content {
        max-height: calc(50vh - 100px);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .terminal-container {
        padding: 0.5rem;
    }
    
    #terminal {
        height: 300px;
    }
    
    .commands-panel {
        width: 100%;
    }
    
    .cmd-shortcut {
        font-size: 0.8rem;
        padding: 0.5rem 0.7rem;
    }
}
