/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&family=Space+Grotesk:wght@300..700&display=swap');

/* Base Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Space Grotesk', sans-serif;
}

code, pre, .code-block {
    font-family: 'Google Sans Code', monospace;
}

main {
    flex: 1;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

footer {
    margin-top: auto;
}

/* Split.js Layout */
.split-container {
    display: flex;
    height: calc(100vh - 72px);
    overflow: hidden;
}

.split-panel {
    overflow-y: auto;
    height: 100%;
}

#content {
    display: flex;
    flex-direction: column;
}

#sidebar {
    background-color: #1e1e1e;
    border-left: 1px solid #333;
}

#sidebar .p-4 {
    background-color: #1e1e1e;
}

.gutter {
    background-color: #dee2e6;
    background-repeat: no-repeat;
    background-position: 50%;
}

.gutter.gutter-horizontal {
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
    cursor: col-resize;
}

/* AI Chat - Dark Mode */
.ai-chat-container {
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    background: #252526;
    display: flex;
    flex-direction: column;
}

.ai-chat-header {
    background-color: #2d2d30;
    color: #cccccc;
    padding: 10px 15px;
    border-bottom: 1px solid #333;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #1e1e1e;
}

.ai-message {
    background: #252526;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #333;
    color: #cccccc;
}

.ai-message small.text-muted {
    color: #858585 !important;
}

.user-message {
    background: #094771;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #0e639c;
    color: #ffffff;
}

.user-message small.text-muted {
    color: #9cdcfe !important;
}

.ai-chat-input {
    flex-shrink: 0;
    padding: 15px;
    background: #252526;
    border-top: 1px solid #333;
}

.ai-chat-input textarea {
    background-color: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #cccccc;
}

.ai-chat-input textarea:focus {
    background-color: #1e1e1e;
    border-color: #007acc;
    color: #cccccc;
}

.ai-chat-input .btn-primary {
    background-color: #0e639c;
    border-color: #0e639c;
}

.ai-chat-input .btn-primary:hover {
    background-color: #1177bb;
    border-color: #1177bb;
}

/* AI Content Formatting */
.ai-content {
    margin-top: 8px;
    color: #cccccc;
}

.ai-content h3, .ai-content h4, .ai-content h5 {
    margin-top: 15px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4ec9b0;
}

.ai-content pre {
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
    margin: 10px 0;
}

.ai-content code {
    font-family: 'Google Sans Code', monospace;
    font-size: 0.9em;
    background: #2d2d30;
    color: #ce9178;
    padding: 2px 4px;
    border-radius: 3px;
}

.ai-content pre code {
    background: transparent;
    padding: 0;
}

.ai-content p {
    margin-bottom: 8px;
}

.ai-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.ai-content li {
    margin-bottom: 4px;
}

.ai-content strong {
    color: #569cd6;
}

/* Snippet Styles */
.snippet-grid-item {
    transition: all 0.3s ease;
}

.snippet-container-compact {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.snippet-container-compact:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.snippet-gif-top {
    overflow: hidden;
}

.snippet-gif-top img {
    transition: transform 0.3s ease;
}

.snippet-container-compact:hover .snippet-gif-top img {
    transform: scale(1.05);
}

.snippet-header {
    flex-shrink: 0;
}

.snippet-header:hover {
    background-color: #f8f9fa;
}

.snippet-body {
    flex-grow: 1;
}

/* Buttons */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Cheatsheet Styles */
.cheatsheet-table {
    margin-bottom: 0;
}

.cheatsheet-key {
    font-weight: 600;
    background-color: #f8f9fa;
    width: 20%;
    text-align: center;
    vertical-align: middle;
}

.cheatsheet-action {
    width: 30%;
    vertical-align: middle;
}

.cheatsheet-section h6 {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.ai-chat-input textarea {
    background-color: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #cccccc;
}

.ai-chat-input textarea::placeholder {
    color: #6c757d;
}

.key-letter {
    background-color: #ff8c00;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}