/* ====================================
   MAIN LAYOUT & STRUCTURE
   ==================================== */

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #fdfcf5;
    color: #333;
}

/* Layout container for sidebar + main content */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ====================================
   SIDEBAR STYLES
   ==================================== */

.sidebar {
    width: 280px;
    background-color: #404040;
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

/* Logo Container */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #CB7E29;
}

.logo-image {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-align: center;
}

.site-title span {
    color: #CB7E29;
}

/* Apps Section in Sidebar */

.apps-title {
    color: #bdc3c7;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.app-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: #595959;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.app-button:hover {
    background-color: #CB7E29;
}

.app-button i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* ====================================
   MAIN CONTENT AREA
   ==================================== */

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    background-color: #fdfcf5;
    min-height: 100vh;
}

.content-card {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fdfcf5;
    padding: 20px;
    border-radius: 0px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

h2 {
    color: #2c3e50;
    margin: 25px 0 15px 0;
}

.highlight {
    background-color: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 6px solid #3498db;
    margin-bottom: 30px;
}

ul {
    margin: 15px 0 25px 30px;
}

li {
    margin-bottom: 10px;
}

/* ====================================
   PROJECT GRID STYLES
   ==================================== */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 5px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

/* ====================================
   VIDEO HOMEPAGE STYLES
   ==================================== */

.video-title {
    color: #fdfcf5;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    width: 100%;
}

/* Video wrapper with fixed aspect ratio */
.video-wrapper {
    width: 90%;
    max-width: 1000px;
    /* This is the key - fixed aspect ratio container */
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    border: 0px solid white;
    background: #000;
    left: 60px;
    /* Prevent any height changes */
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Iframe fills the container */
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .video-wrapper {
        width: 90%;
        max-width: 1000px;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        height: 0;
        position: relative;
    }

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-wrapper {
        width: 95%;
        border-width: 2px;
    }
}

.video-caption {
    margin-top: 20px;
    color: #fdfcf5;
    font-size: 1.1rem;
    text-align: center;
    opacity: 0;
    max-width: 800px;
}

/* ====================================
   FOOTER STYLES
   ==================================== */

footer {
    background-color: #f8f9fa;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-radius: 8px;
}

.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #CB7E29;
    text-align: center;
    color: #7f8c8d;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 768px) {
    /* Mobile layout - stack sidebar on top */
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    /* Adjust logo for mobile */
    .logo-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo, .logo-image {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }

    .site-title {
        font-size: 1.2rem;
    }

    /* Adjust navigation for mobile */
    .nav-menu {
        margin-top: 20px;
    }

    .nav-button {
        padding: 12px 15px;
    }

    /* Video adjustments for mobile */
    .video-title {
        font-size: 1.8rem;
    }

    .video-wrapper {
        border-width: 2px;
    }

    /* Override for video homepage on mobile */
    .main-content:has(.video-container) {
        margin-left: 0;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .video-title {
        font-size: 1.5rem;
    }

    .video-wrapper {
        border-radius: 10px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .content-card {
        padding: 20px;
    }
}

/* ====================================
   UTILITY CLASSES
   ==================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* Object image styling */
.object-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    image-rendering: crisp-edges; /* For pixel art if applicable */
}

/* Compact card adjustments */
.object-card {
    padding: 6px 4px;
}

.object-name {
    font-weight: bold;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    margin: 2px 0;
}

.category-values {
    font-size: 0.6rem;
    background: rgba(255,255,255,0.2);
    padding: 2px 4px;
    border-radius: 3px;
    margin: 2px 0;
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-value {
    display: inline-block;
    font-weight: bold;
}

.category-value.cat1 { color: #ff8a80; }
.category-value.cat2 { color: #82b1ff; }
.category-value.cat3 { color: #b9f6ca; }

.property-dots {
    display: flex;
    gap: 2px;
    justify-content: center;
    margin-top: 2px;
    flex-wrap: wrap;
    max-width: 80px;
}

.property-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.5);
    cursor: help;
}

.more-props {
    font-size: 0.6rem;
    background: rgba(255,255,255,0.3);
    padding: 1px 4px;
    border-radius: 8px;
    margin-left: 2px;
}

/* Update context menu for better property display */
.context-menu-content {
    max-height: 300px;
    overflow-y: auto;
}

.context-menu-content ul {
    margin: 5px 0;
    padding-left: 20px;
    columns: 2; /* Show properties in two columns */
    column-gap: 20px;
}

.context-menu-content li {
    margin-bottom: 2px;
    break-inside: avoid;
}
