@import "template.css";

/* Main wrapper — mirrors .projects-wrapper pattern */
.creo-wrapper {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px 0;
}

/* Page heading */
.creo-header {
    text-align: center;
    margin-bottom: 30px;
}

.creo-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
}

body.dark-mode .creo-header h1 {
    color: #fff;
}

.creo-header p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #666;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

body.dark-mode .creo-header p {
    color: #b3b3b3;
}

/* Model card */
.creo-card {
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

body.dark-mode .creo-card {
    background: rgba(17, 20, 24, 0.6);
    border: 1px solid rgba(0, 210, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* STL Viewer container */
#stl-viewer-container {
    position: relative;
    width: 100%;
    height: 520px;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f6;
}

body.dark-mode #stl-viewer-container {
    background: #111418;
}

#stl-canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    cursor: grab;
}

#stl-canvas:active {
    cursor: grabbing;
}

/* Controls hint bar */
#stl-controls-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    padding: 5px 14px;
    border-radius: 20px;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Loading overlay */
#stl-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: inherit;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #666;
}

body.dark-mode #stl-loading {
    color: #b3b3b3;
}

.stl-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #6272a4;
    border-radius: 50%;
    animation: stl-spin 0.8s linear infinite;
}

body.dark-mode .stl-spinner {
    border-color: rgba(255,255,255,0.1);
    border-top-color: #00d2ff;
}

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

/* Download button */
.creo-download {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.creo-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: #fff;
}

/* Mobile */
@media only screen and (max-width: 768px) {
    .creo-wrapper {
        width: 95%;
        margin: 20px auto;
    }

    .creo-header h1 {
        font-size: 1.4rem;
    }

    #stl-viewer-container {
        height: 320px;
    }
}