/* Background */
* { 
    box-sizing: border-box; 
}

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at center, #101226 0%, #05050d 100%);
    color: #e2e8f0;
    overflow: hidden;
    height: 100vh;
    user-select: none;
}

/* Control Panel */
#controls {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(15, 23, 42, 0.9);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.2);
    z-index: 10;
    border: 1px solid rgba(99, 102, 241, 0.4);
    backdrop-filter: blur(8px);
}

.hud-data {
    font-size: 11px;
    margin-top: 12px;
    color: #64748b;
    line-height: 1.6;
}

.hud-data strong {
    color: #38bdf8;
}

/* Buttons */
button {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 12px;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    transition: all 0.3s ease;
}

button:hover { 
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.7);
}

/* Scalable Workspace */
#board {
    width: 100vw;
    height: 100vh;
    position: relative;
    cursor: grab;
}

#board:active {
    cursor: grabbing;
}

/* Container */
#pan-zoom-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

/* Story block constelations */
.node {
    position: absolute;
    background: rgba(22, 28, 45, 0.95);
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 10px;
    padding: 14px;
    width: 240px;
    cursor: move;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.node:focus-within { 
    border-color: #a855f7; 
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.node-header {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    letter-spacing: 1px;
}

.delete-btn {
    color: #ef4444;
    cursor: pointer;
    font-weight: bold;
}

.delete-btn:hover {
    color: #f87171;
}

/* Form Inputs */
.node-input {
    width: 100%;
    background: #0b0f19;
    border: 1px solid #334155;
    color: #f1f5f9;
    padding: 8px;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
}

.node-input:focus {
    outline: none;
    border-color: #6366f1;
}

.conn-input {
    width: 100%;
    background: #0f172a;
    border: 1px solid #1e293b;
    color: #38bdf8;
    font-size: 11px;
    padding: 5px;
    margin-top: 8px;
    border-radius: 4px;
    font-family: monospace;
}

.conn-input:focus {
    outline: none;
    border-color: #38bdf8;
}
/* Presentation */

#landing-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #0d0f22 0%, #030307 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    overflow-y: auto;
    padding: 40px 20px;
}

#landingStars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.landing-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    animation: fadeIn 1s ease-out forwards;
}

.cosmic-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.landing-content h1 {
    font-size: 3.5rem;
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.landing-content p {
    font-size: 1.15rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 40px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.feature-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 12px;
    text-align: left;
    backdrop-filter: blur(10px);
}

.feature-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #f8fafc;
}

.feature-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
}

.launch-btn {
    font-size: 14px;
    padding: 16px 40px;
    border-radius: 30px;
    letter-spacing: 1px;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

.launch-btn:hover {
    box-shadow: 0 0 45px rgba(168, 85, 247, 0.8);
    transform: scale(1.03);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

