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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

/* Navigation Bar */
.navbar {
    display: none; /* Hidden by default, shown on tablet+ */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 40px;
}

.navbar-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-link {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 0;
}

.navbar-link:hover {
    color: #667eea;
}

/* Show navbar on tablet and larger screens */
@media (min-width: 768px) {
    .navbar {
        display: block;
    }
    
    body {
        padding-top: 64px; /* Add padding to body to account for fixed navbar */
    }
}

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

/* Header Styles */
header {
    background-color: transparent;
    padding: 20px;
    border-radius: 8px;
    box-shadow: none;
    margin-bottom: 20px;
}

header[style*="display: none"] {
    margin-bottom: 0;
}

header h1 {
    color: #2c3e50;
    font-size: 2rem;
}

/* Main Content */
main {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

#content {
    min-height: 200px;
}

/* Project Header */
.project-header {
    width: 100%;
}

.project-banner {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.project-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-info {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.project-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.2;
}

.project-description {
    font-size: 1.125rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 32px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
}

.project-owner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.owner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e5e5;
}

.owner-name {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.project-date {
    font-size: 0.875rem;
    color: #999;
}

/* Project Content Wrapper */
.project-content-wrapper {
    padding: 0 40px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.project-content-empty {
    padding: 40px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Utility Classes */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Shimmer Loading Effect */
.shimmer-container {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.shimmer-line {
    height: 12.5em;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 1.5em;
    animation: shimmer 3s infinite;
}

.shimmer-line:last-child {
    margin-bottom: 0;
}

.shimmer-line.short {
    width: 60%;
}

.shimmer-line.medium {
    width: 80%;
}

.shimmer-line.long {
    width: 100%;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.error {
    background-color: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.success {
    background-color: #efe;
    color: #3c3;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Project Content */
.project-content {
    line-height: 1.8;
    font-size: 18px;
}

.project-content pre {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    
}

/* QuillJS Renderer Styles */
.quill-renderer-container {
    min-height: 200px;
}

.quill-renderer-container .ql-container,
.ql-container.ql-snow,
.quill-renderer-container .ql-container.ql-snow {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 18px;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
}

.quill-renderer-container .ql-toolbar,
.quill-renderer-container .ql-toolbar.ql-snow {
    display: none;
}

.quill-renderer-container .ql-editor {
    border: none !important;
    outline: none !important;
}

.quill-renderer-container .ql-editor {
    padding: 0;
    line-height: 1.8;
    font-size: 18px;
}

.quill-renderer-container .ql-editor.ql-blank::before {
    color: #999;
    font-style: normal;
}

/* Ensure Quill content is readable */
.quill-renderer-container .ql-editor p {
    margin-bottom: 1.2em;
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.quill-renderer-container .ql-editor ol,
.quill-renderer-container .ql-editor ul {
    margin-bottom: 1.2em;
    padding-left: 1.5em;
    font-size: 18px;
}

.quill-renderer-container .ql-editor li {
    margin-bottom: 0.5em;
    line-height: 1.8;
}

.quill-renderer-container .ql-editor pre {
    margin-bottom: 1.2em;
    font-size: 16px;
}

.quill-renderer-container .ql-editor blockquote {
    margin-bottom: 1.2em;
    font-size: 18px;
    border-left: 4px solid #e5e5e5;
    padding-left: 1em;
    color: #666;
    font-style: italic;
}

.quill-renderer-container .ql-editor h1 {
    font-size: 2.25rem;
    margin-bottom: 1em;
    margin-top: 1.5em;
    font-weight: 700;
    line-height: 1.3;
}

.quill-renderer-container .ql-editor h2 {
    font-size: 1.875rem;
    margin-bottom: 0.9em;
    margin-top: 1.3em;
    font-weight: 700;
    line-height: 1.3;
}

.quill-renderer-container .ql-editor h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8em;
    margin-top: 1.2em;
    font-weight: 600;
    line-height: 1.4;
}

.quill-renderer-container .ql-editor h4 {
    font-size: 1.25rem;
    margin-bottom: 0.7em;
    margin-top: 1em;
    font-weight: 600;
    line-height: 1.4;
}

.quill-renderer-container .ql-editor h5,
.quill-renderer-container .ql-editor h6 {
    font-size: 1.125rem;
    margin-bottom: 0.6em;
    margin-top: 0.9em;
    font-weight: 600;
    line-height: 1.4;
}

.quill-renderer-container .ql-editor img {
    max-width: 100%;
    height: auto;
    margin: 1.5em 0;
    border-radius: 8px;
}

/* Video Embed Styles */
.video-embed-container {
    margin: 20px 0;
    width: 100%;
}

.video-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Default 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
}

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

.video-embed-caption {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    font-style: italic;
    text-align: center;
}

.video-embed-error {
    padding: 20px;
    background-color: #fee;
    color: #c33;
    border-radius: 4px;
    text-align: center;
    margin: 20px 0;
}

.ql-video-embed {
    display: block;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .project-banner {
        height: 200px;
    }
    
    .project-info {
        padding: 24px 20px;
    }
    
    .project-title {
        font-size: 1.875rem;
    }
    
    .project-description {
        font-size: 1rem;
    }
    
    .project-content-wrapper {
        padding: 0 20px 24px;
    }
    
    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .quill-renderer-container .ql-editor {
        font-size: 16px;
    }
    
    .quill-renderer-container .ql-editor p {
        font-size: 16px;
    }
    
    .quill-renderer-container .ql-editor h1 {
        font-size: 1.875rem;
    }
    
    .quill-renderer-container .ql-editor h2 {
        font-size: 1.5rem;
    }
    
    .quill-renderer-container .ql-editor h3 {
        font-size: 1.25rem;
    }
}

