* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background: #1a1a1a;
    color: white;
    overflow: hidden;
}
#drop-zone {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    z-index: 100;
}
#drop-zone.hidden {
    display: none;
}
.drop-content {
    text-align: center;
    padding: 60px;
    border: 4px dashed #555;
    border-radius: 10px;
    background: #2a2a2a;
}
.drop-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
}
.drop-content p {
    color: #999;
    margin-bottom: 20px;
}
.file-button {
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    font-size: 16px;
    font-family: Arial, sans-serif;
}
.file-button:hover {
    background: #1d4ed8;
}
#controls {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(5px);
    padding: 15px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}
#controls.visible {
    display: flex;
}
.control-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.control-button {
    padding: 10px 20px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-family: Arial, sans-serif;
}
.control-button:hover {
    background: #1d4ed8;
}
.info {
    font-size: 14px;
    color: #bbb;
}
#fov-display {
    font-size: 14px;
    color: #bbb;
}
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: grab;
}
#canvas-container:active {
    cursor: grabbing;
}
#label-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}
.pano-label {
    position: absolute;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
}
.pano-label .name.clickable:hover {
    text-decoration: underline;
    color: #2563eb !important;
}
#dev-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(60, 60, 60, 0.8);
    backdrop-filter: blur(5px);
    padding: 15px;
    display: none;
    z-index: 20;
    max-height: 250px;
    padding-bottom: 25px;
    overflow-y: auto;
}
#dev-panel.visible {
    display: block;
}
.dev-controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.dev-controls {
    display: contents;
}
.add-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    min-height: 145px;
    border: 2px dashed #555;
    border-radius: 5px;
}
.add-btn {.style-buttons {
    display: flex;
    gap: 3px;
}

.style-btn {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: normal;
    transition: opacity 0.2s;
    padding: 0;
    opacity: 0.6;
}

.style-btn:hover {
    opacity: 1;
}

.style-btn.active {
    opacity: 1;
    font-weight: bold;
}
    background: #388e3c;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.add-btn:hover {
    background: #2e7d32;
}
.dev-control {
    background: #333;
    padding: 8px;
    border-radius: 5px;
    width: 280px;
    flex-shrink: 0;
}
.dev-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.dev-control-header h4 {
    margin: 0;
    font-size: 14px;
}
.input-grid {
    display: grid;
    grid-template-columns: 45px 1fr;
    gap: 6px 4px;
    align-items: center;
}
.input-grid span {
    font-size: 12px;
    color: #aaa;
    text-align: right;
    padding-right: 5px;
}
.input-grid input {
    width: 100%;
    padding: 4px;
    background: #555;
    border: 1px solid #777;
    color: white;
    border-radius: 3px;
    font-size: 12px;
}
.input-grid input[type="url"] {
    grid-column: 1 / -1;
}
.input-grid span.url-label {
    grid-column: 1 / -1;
    text-align: left;
    padding: 0;
    margin-bottom: -2px;
}
.delete-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}
.delete-btn:hover {
    background: #b71c1c;
}
.download-btn {
    background: #1976d2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
}
.download-btn:hover {
    background: #1565c0;
}
#code-output {
    background: #222;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
}
.status-message {
    font-size: 12px;
    color: #aaa;
    margin-left: 10px;
}
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.8s ease-out;
}
#splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}
.splash-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}
.splash-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 30px;
    animation: slideDown 0.8s ease-out;
}
.splash-instructions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.instruction-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}
.instruction-item:nth-child(1) { animation-delay: 0.2s; }
.instruction-item:nth-child(2) { animation-delay: 0.4s; }
.instruction-item:nth-child(3) { animation-delay: 0.6s; }
.instruction-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}
.instruction-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}
.instruction-desc {
    font-size: 14px;
    opacity: 0.9;
}
.splash-footer {
    margin-top: 40px;
    font-size: 14px;
    opacity: 0.8;
    animation: fadeIn 1s ease-out 0.8s both;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.8; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
#copyright {
    position: fixed;
    bottom: 10px;
    right: 15px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
    z-index: 30;
    pointer-events: none;
    line-height: 1.4;
}
#vertical-lines-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    overflow: hidden;
    display: none;
}
#vertical-lines-container.visible {
    display: block;
}
.vertical-line {
    position: absolute;
    width: 1px;
    height: 100%;
    background-image: linear-gradient(to bottom, rgba(255, 255, 0, 0.6) 50%, transparent 50%);
    background-size: 1px 20px;
    transform: translateX(-50%);
}
.vertical-line .angle-label {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: yellow;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    left: 50%;
}
@media (hover: none) and (pointer: coarse) {
    #controls,
    #dev-panel,
    #drop-zone {
        display: none !important;
    }
    .pano-label .name {
        font-size: 14px !important;
        padding: 3px 6px !important;
    }
    #copyright {
        font-size: 10px;
    }
}
.style-buttons {
    display: flex;
    gap: 4px;
}

.style-btn {
    width: 24px;
    height: 24px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    transition: all 0.2s;
    padding: 0;
}

.style-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.style-btn.active {
    border-color: white;
    box-shadow: 0 0 8px rgba(255,255,255,0.8);
}