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

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: white;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
}

#3d-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

/* UI Overlay */
#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.ui-panel {
    position: absolute;
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

#current-post {
    top: 20px;
    left: 20px;
    max-width: 300px;
}

#status-indicators {
    top: 20px;
    right: 20px;
    text-align: right;
}

#current-post h3 {
    color: #3498db;
    margin-bottom: 5px;
    font-size: 1.1em;
}

#current-post p {
    color: #bbb;
    font-size: 0.9em;
    line-height: 1.4;
}

#status-indicators div {
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #95a5a6;
}

/* Loading and Error States */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #bbb;
    z-index: 5;
}

#error-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 10px;
    color: white;
    z-index: 20;
    text-align: center;
    border: 1px solid #e74c3c;
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

/* Post Viewer Modal - Position on Right */
#post-viewer-modal.modal {
    left: auto;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 500px;
}

/* Keep other modals centered */
#create-modal.modal,
#time-modal.modal,
#help-modal.modal {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}


.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2d2d2d;
    border-radius: 10px;
    padding: 0;
    z-index: 1001;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #444;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content {
    padding: 30px;
}

.modal h2 {
    margin-bottom: 20px;
    color: #3498db;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.modal input, .modal textarea, .modal select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #3d3d3d;
    border: 1px solid #555;
    border-radius: 6px;
    color: white;
    font-size: 14px;
}

.modal textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-primary {
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary {
    background: #7f8c8d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary:hover {
    background: #6c7b7d;
}

/* Control Groups */
.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ddd;
}

.control-group select,
.control-group input {
    width: 100%;
    padding: 10px;
    background: #3d3d3d;
    border: 1px solid #555;
    border-radius: 6px;
    color: white;
}

/* Shortcut List */
.shortcut-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.key {
    background: #3498db;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    font-family: monospace;
}

.action {
    color: #ddd;
    flex: 1;
}

/* Navigation Instructions */
.navigation-instructions {
    background: #3d3d3d;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #3498db;
}

.navigation-instructions h3 {
    margin-bottom: 10px;
    color: #3498db;
}

.navigation-instructions p {
    margin: 8px 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.navigation-instructions strong {
    color: #3498db;
}

/* Post Content Styles */
.post-meta {
    color: #95a5a6;
    font-size: 0.9em;
    margin: 10px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.post-content {
    line-height: 1.6;
    margin: 15px 0;
}
