/* 현대적인 3D 건물 뷰어 스타일 */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --background-dark: #0f172a;
    --background-light: #1e293b;
    --surface-color: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --border-color: #475569;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(30, 41, 59, 0.8);
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

a {
    text-decoration: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-light) 100%);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}
#controlpanel{
    display: none;
}
/* App Container */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.nav {
    display: flex;
    gap: 0.5rem;
}

/* Model dropdown */
.nav-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}
.nav-select-wrap i {
    color: var(--accent-color);
}
.nav-select {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    outline: none;
}
.nav-select:focus {
    color: var(--text-primary);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
}

/* 3D Viewer Container */
.viewer-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#three-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Loading Screen */
.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    max-width: 300px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--surface-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--surface-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Controls Panel */
.controls-panel {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    min-width: 220px;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.control-group {
    margin-bottom: 1.2rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--surface-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.control-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--accent-color);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

/* Floating Action Button */
.fab {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 8px 24px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 30;
}

.fab:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--shadow-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px var(--shadow-color);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--surface-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.upload-btn {
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .nav {
        gap: 0.25rem;
    }

    .nav-btn span {
        display: none;
    }

    .controls-panel {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
        padding: 1rem;
    }

    .fab {
        bottom: 1rem;
        right: 1rem;
    }

    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .modal-header,
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .logo span {
        display: none;
    }

    .controls-panel {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin: 1rem;
        border-radius: 0.75rem;
    }
}

/* Animation Controls */
.animation-info {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.animation-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface-color);
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.animation-status i {
    color: var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
