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

:root {
    --primary-green: #2D5016;
    --secondary-green: #4A7C2C;
    --accent-green: #6B9F4A;
    --light-green: #E8F5E1;
    --dark-gray: #2C2C2C;
    --medium-gray: #5A5A5A;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --shadow: rgba(45, 80, 22, 0.15);
    --shadow-strong: rgba(45, 80, 22, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    overflow: hidden;
    color: var(--dark-gray);
}

/* Main Container */
.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 245, 245, 0.98) 100%);
    backdrop-filter: blur(10px);
    padding: 12px 40px;
    box-shadow: 0 4px 20px var(--shadow);
    z-index: 1000;
    animation: slideDown 0.6s ease-out;
    border-bottom: 2px solid var(--accent-green);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    width: 60px;
    height: 60px;
    color: var(--primary-green);
    flex-shrink: 0;
}

.logo svg {
    width: 100%;
    height: 100%;
}

.title-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: var(--dark-gray);
    margin-bottom: 3px;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.title-section h1 strong {
    font-weight: 700;
    color: var(--primary-green);
}

.subtitle {
    font-size: 13px;
    color: var(--medium-gray);
    font-weight: 500;
    margin-bottom: 2px;
    line-height: 1.3;
}

.project-meta {
    font-size: 11px;
    color: var(--medium-gray);
    font-weight: 400;
    line-height: 1.3;
}

.info-pills {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.pill {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-strong);
}

.model-switcher-section {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.model-label {
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    color: var(--dark-gray);
    border: 2px solid var(--accent-green);
    font-weight: 600;
    padding: 8px 14px;
    font-size: 11px;
}

.model-switcher-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 14px;
    font-size: 11px;
}

.model-switcher-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px var(--shadow-strong);
}

.model-switcher-btn:active {
    transform: scale(0.98);
}

/* Model Viewer Container */
.viewer-container {
    flex: 1;
    position: relative;
    background: #1a202c;
    overflow: hidden;
}

model-viewer {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #1a202c 0%, #2d3748 100%);
}

/* QR Code Container */
#qr-container {
    position: absolute;
    top: 24px;
    right: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 245, 245, 0.98) 100%);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-strong);
    text-align: center;
    z-index: 1000;
    max-width: 300px;
    animation: fadeInRight 0.8s ease-out;
    border: 2px solid var(--accent-green);
}

@keyframes fadeInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#qr-container h3 {
    font-size: 18px;
    color: var(--dark-gray);
    margin-bottom: 16px;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
}

#qrcode {
    margin: 16px auto;
    display: inline-block;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px var(--shadow);
}

.qr-text {
    font-size: 12px;
    margin: 10px 0;
    color: var(--medium-gray);
    word-wrap: break-word;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
}

.qr-hint {
    font-size: 11px;
    color: var(--secondary-green);
    margin-top: 12px;
    font-style: italic;
}

.qr-instructions {
    background: rgba(232, 245, 225, 0.5);
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    text-align: left;
    border: 1px solid var(--accent-green);
}

.qr-instructions p {
    font-size: 12px;
    color: var(--dark-gray);
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-number {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Info Panel */
.info-panel {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 245, 245, 0.98) 100%);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-strong);
    max-width: 450px;
    max-height: 65vh;
    overflow-y: auto;
    z-index: 1000;
    animation: fadeInLeft 0.8s ease-out;
    border: 2px solid var(--accent-green);
    transition: all 0.3s ease;
}

.info-panel::-webkit-scrollbar {
    width: 10px;
}

.info-panel::-webkit-scrollbar-track {
    background: rgba(232, 245, 225, 0.3);
    border-radius: 5px;
    margin: 4px 0;
}

.info-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.info-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-green) 0%, var(--accent-green) 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Firefox scrollbar styling */
.info-panel {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) rgba(232, 245, 225, 0.3);
}

.info-panel.minimized {
    max-height: 60px;
    overflow: hidden;
    padding: 0 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.info-panel.minimized .info-panel-content {
    display: none;
}

.info-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.info-panel.minimized .info-panel-header {
    margin-bottom: 0;
    width: 100%;
}

.info-panel h3 {
    font-size: 20px;
    color: var(--dark-gray);
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    flex: 1;
    margin: 0;
}

.minimize-btn {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: var(--white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.minimize-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px var(--shadow-strong);
}

@keyframes fadeInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.structure-item {
    background: rgba(232, 245, 225, 0.3);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--accent-green);
    transition: all 0.3s ease;
}

.structure-item:hover {
    background: rgba(232, 245, 225, 0.5);
    transform: translateX(4px);
}

.structure-item.featured {
    background: linear-gradient(135deg, rgba(232, 245, 225, 0.6) 0%, rgba(232, 245, 225, 0.4) 100%);
    border-left: 4px solid var(--primary-green);
}

.structure-item h4 {
    font-size: 15px;
    color: var(--primary-green);
    margin-bottom: 8px;
    font-weight: 600;
}

.structure-item p {
    font-size: 13px;
    color: var(--dark-gray);
    line-height: 1.7;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tech-badge {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.team-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--accent-green);
}

.team-info h4 {
    font-size: 15px;
    color: var(--primary-green);
    margin-bottom: 8px;
    font-weight: 600;
}

.team-info p {
    font-size: 13px;
    color: var(--dark-gray);
    line-height: 1.7;
    margin-bottom: 6px;
}

.team-note {
    font-size: 12px;
    color: var(--medium-gray);
    font-style: italic;
}

/* Controls Info */
.controls-info {
    position: absolute;
    top: 24px;
    left: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 245, 245, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow);
    z-index: 1000;
    animation: fadeInLeft 0.8s ease-out 0.2s both;
    border: 2px solid var(--accent-green);
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.controls-info.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.controls-info h4 {
    font-size: 15px;
    color: var(--dark-gray);
    margin-bottom: 12px;
    font-weight: 600;
}

.control-item {
    font-size: 13px;
    color: var(--dark-gray);
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-icon {
    background: rgba(232, 245, 225, 0.6);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--primary-green);
    min-width: 70px;
    text-align: center;
    border: 1px solid var(--accent-green);
}

/* Loading Animation */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.95) 0%, rgba(74, 124, 44, 0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 2000;
    animation: fadeOut 1s ease-out 2s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .header {
        padding: 16px 20px;
    }

    .header-content {
        gap: 12px;
    }

    .title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .logo {
        width: 40px;
        height: 40px;
    }

    .title-section h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 12px;
    }

    .project-meta {
        font-size: 11px;
    }

    .info-pills {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .pill {
        font-size: 11px;
        padding: 8px 14px;
    }

    .model-switcher-section {
        width: 100%;
        justify-content: space-between;
    }

    .model-label {
        font-size: 11px;
        padding: 8px 14px;
    }

    .model-switcher-btn {
        font-size: 11px;
        padding: 8px 14px;
    }

    #qr-container {
        display: none !important;
    }

    .footer {
        bottom: 4px;
        right: 12px;
        padding: 6px 12px;
        border-radius: 6px;
    }

    .footer p {
        font-size: 9px;
    }

    .controls-info {
        top: 12px;
        left: 12px;
        right: 12px;
        padding: 12px 16px;
        border-radius: 10px;
    }

    .controls-info h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .control-item {
        font-size: 11px;
        margin: 6px 0;
    }

    .control-icon {
        min-width: 60px;
        font-size: 10px;
        padding: 4px 8px;
    }

    .info-panel {
        bottom: 12px;
        left: 12px;
        right: 12px;
        max-width: none;
        padding: 16px;
        max-height: 45vh;
        border-radius: 12px;
    }

    .info-panel.minimized {
        max-height: 50px;
        padding: 12px 16px;
    }

    .info-panel h3 {
        font-size: 16px;
    }

    .minimize-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .structure-item {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .structure-item h4 {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .structure-item p {
        font-size: 11px;
        line-height: 1.6;
    }

    .tech-stack {
        gap: 6px;
        margin-top: 12px;
    }

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

    .team-info {
        margin-top: 16px;
        padding-top: 16px;
    }

    .team-info h4 {
        font-size: 13px;
    }

    .team-info p {
        font-size: 11px;
    }

    .viewer-container {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    model-viewer {
        min-height: 60vh;
        height: auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .info-panel {
        max-width: 380px;
        font-size: 13px;
    }

    .structure-item h4 {
        font-size: 14px;
    }

    .structure-item p {
        font-size: 12px;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .pill,
    .tech-badge,
    .control-icon {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .structure-item {
        padding: 16px;
    }
}

/* Footer */
.footer {
    position: absolute;
    bottom: 8px;
    right: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    z-index: 999;
    border: 1px solid var(--accent-green);
}

.footer p {
    font-size: 11px;
    color: var(--medium-gray);
    margin: 0;
    font-weight: 400;
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 8px 16px;
    }

    .title-section h1 {
        font-size: 18px;
    }

    .subtitle {
        font-size: 11px;
    }

    .project-meta {
        font-size: 10px;
    }

    .info-pills {
        gap: 6px;
    }

    .pill {
        font-size: 10px;
        padding: 6px 12px;
    }

    .controls-info {
        top: 8px;
        left: 8px;
        right: 8px;
        max-height: 30vh;
        overflow-y: auto;
        padding: 10px 14px;
    }

    .info-panel {
        bottom: 8px;
        left: 8px;
        right: 8px;
        max-height: 35vh;
        overflow-y: auto;
        padding: 12px 14px;
    }

    .info-panel.minimized {
        max-height: 45px;
        padding: 10px 14px;
    }

    .info-panel h3,
    .controls-info h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .structure-item {
        padding: 10px;
        margin-bottom: 6px;
    }

    .structure-item h4 {
        font-size: 12px;
    }

    .structure-item p {
        font-size: 10px;
    }

    .control-item {
        font-size: 10px;
        margin: 4px 0;
    }

    .tech-stack {
        gap: 5px;
        margin-top: 8px;
    }

    .tech-badge {
        font-size: 9px;
        padding: 5px 8px;
    }

    #qr-container {
        display: none !important;
    }
}

/* Made with Bob */
