/* ==========================================================================
   jCloud System — Construction Landing Stylesheet
   ========================================================================== */

:root {
    --bg-main: #090d16;
    --bg-card: rgba(18, 24, 38, 0.75);
    --border-card: rgba(56, 189, 248, 0.2);
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-cyan: #38bdf8;
    --color-blue: #3b82f6;
    --color-amber: #f59e0b;
    --color-green: #22c55e;
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--color-text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Grid & Ambient Glows */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.35;
}

.bg-glow-1 {
    top: -150px;
    left: -100px;
    background: radial-gradient(circle, var(--color-blue), transparent 70%);
}

.bg-glow-2 {
    bottom: -200px;
    right: -100px;
    background: radial-gradient(circle, var(--color-cyan), transparent 70%);
}

#spark-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Top Hazard Ticker Bar */
.hazard-bar {
    width: 100%;
    background: #0f172a;
    border-bottom: 2px solid var(--color-amber);
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.hazard-stripe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        -45deg,
        var(--color-amber),
        var(--color-amber) 12px,
        #000 12px,
        #000 24px
    );
}

.ticker-text {
    display: flex;
    gap: 40px;
    padding: 10px 0;
    white-space: nowrap;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-amber);
    letter-spacing: 1px;
    animation: ticker 30s linear infinite;
}

.ticker-text span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Main Container */
.main-container {
    width: 100%;
    max-width: 900px;
    padding: 40px 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    z-index: 1;
}

/* Header & Logo */
.logo-wrapper {
    display: flex;
    justify-content: center;
}

.logo-card {
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 24px 40px;
    border-radius: 24px;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(56, 189, 248, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.logo-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6),
                0 0 45px rgba(56, 189, 248, 0.3);
}

.logo-inner {
    max-width: 220px;
    margin: 0 auto;
}

.logo-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.2));
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 6px 14px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-cyan);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-green);
    animation: blink 1.5s infinite alternate;
}

@keyframes blink {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* Scene SVG Construction Animation */
.scene-container {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 20px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    overflow: hidden;
}

.construction-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* SVG Animations */
.anim-dash {
    animation: dashMove 2s linear infinite;
}

@keyframes dashMove {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -50; }
}

.anim-cloud {
    animation: floatCloud 8s ease-in-out infinite alternate;
}
.cloud-2 { animation-delay: -4s; }

@keyframes floatCloud {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-12px); }
}

.anim-hammer-arm {
    transform-origin: 165px 150px;
    animation: hammerSwing 0.8s ease-in-out infinite alternate;
}

@keyframes hammerSwing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-25deg); }
}

.spark {
    animation: sparkPulse 0.4s ease-in-out infinite alternate;
}
.s2 { animation-delay: 0.15s; }
.s3 { animation-delay: 0.3s; }

@keyframes sparkPulse {
    0% { opacity: 0.1; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1.4); }
}

.anim-crane-box {
    animation: craneBoxFloat 4s ease-in-out infinite alternate;
}

@keyframes craneBoxFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

.pulse-led { animation: blink 1s infinite alternate; }
.pulse-led-2 { animation: blink 1.2s 0.5s infinite alternate; }

.cone-light {
    animation: coneGlow 1.2s infinite alternate;
}

@keyframes coneGlow {
    0% { fill: #f59e0b; filter: drop-shadow(0 0 2px #f59e0b); }
    100% { fill: #ef4444; filter: drop-shadow(0 0 8px #ef4444); }
}

.holo-box {
    animation: holoGlow 3s ease-in-out infinite alternate;
}

@keyframes holoGlow {
    0% { stroke: rgba(56, 189, 248, 0.4); box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.2); }
    100% { stroke: rgba(56, 189, 248, 1); box-shadow: inset 0 0 25px rgba(56, 189, 248, 0.6); }
}

/* Content Section */
.content-section {
    text-align: center;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Progress Card */
.card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.progress-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text-main);
}

.progress-percent {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-cyan);
}

.progress-bar-bg {
    width: 100%;
    height: 14px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 28px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-blue), var(--color-cyan));
    border-radius: 10px;
    position: relative;
    transition: width 1.5s ease-out;
}

.progress-glow {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: #ffffff;
    filter: blur(4px);
    opacity: 0.6;
}

/* Steps List */
.steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.step-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

.step-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 12px;
}

.step-completed .step-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-green);
}

.step-active .step-icon {
    background: rgba(56, 189, 248, 0.15);
    color: var(--color-cyan);
}

.step-pending .step-icon {
    background: rgba(148, 163, 184, 0.15);
    color: var(--color-text-muted);
}

.step-name {
    flex-grow: 1;
    color: var(--color-text-main);
    font-weight: 500;
}

.step-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.step-completed .step-status { color: var(--color-green); background: rgba(34, 197, 94, 0.1); }
.step-active .step-status { color: var(--color-cyan); background: rgba(56, 189, 248, 0.1); }
.step-pending .step-status { color: var(--color-text-muted); background: rgba(148, 163, 184, 0.1); }

.pulsing { animation: blink 1s infinite alternate; }

/* Buttons */
.actions-wrapper {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.btn {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.8);
    color: var(--color-text-main);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn-secondary:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--color-cyan);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.domain-tag {
    color: var(--color-cyan);
    font-weight: 600;
    font-family: monospace;
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-main);
    border: 1px solid var(--border-card);
    width: 100%;
    max-width: 480px;
    padding: 32px;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex-grow: 1;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 12px 16px;
    border-radius: 12px;
    color: white;
    font-family: var(--font-body);
    outline: none;
}

.input-group input:focus {
    border-color: var(--color-cyan);
}

.notify-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--color-green);
    color: var(--color-green);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    margin-top: 16px;
}

.hidden { display: none; }

/* Telemetry Grid */
.telemetry-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.telemetry-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: #0f172a;
    border-radius: 12px;
    font-size: 0.85rem;
}

.telemetry-label { color: var(--color-text-muted); }
.val-online { color: var(--color-green); font-weight: 600; }
.val-building { color: var(--color-amber); font-weight: 600; }

/* Responsive adjustments */
@media (max-width: 640px) {
    .main-title { font-size: 2.3rem; }
    .main-subtitle { font-size: 1rem; }
    .input-group { flex-direction: column; }
    .scene-container { padding: 10px; }
}
