@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --background: #090e1b;
    --panel: #111a2d;
    --panel-light: #19253c;
    --border: #263550;
    --text: #f3f6ff;
    --muted: #8996b1;
    --accent: #8b5cf6;
    --cyan: #35d9ed;
    --success: #39d98a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% 0%, #172347 0%, transparent 45%),
        var(--background);
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

button, input, select {
    font: inherit;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
}

.topbar {
    min-height: 76px;
    padding: 0 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(9,14,27,.88);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo > span:nth-child(2) {
    color: var(--cyan);
}

.logo-icon {
    color: var(--accent);
    font-size: 26px;
    margin-right: 5px;
}

.logo small {
    color: var(--muted);
    font-size: 8px;
    letter-spacing: 2px;
    margin-left: 7px;
}

nav {
    display: flex;
    gap: 27px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

nav a {
    transition: .2s;
}

nav a:hover {
    color: var(--cyan);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.server-status {
    color: var(--muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.server-status i,
.project-status i {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

.icon-button {
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    width: 37px;
    height: 37px;
    border-radius: 10px;
}

.main-container {
    max-width: 1250px;
    margin: auto;
    padding: 0 30px;
}

.hero {
    min-height: 470px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 30px;
    padding: 65px 0;
}

.eyebrow {
    color: var(--cyan);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero h1 {
    max-width: 580px;
    font-size: clamp(38px, 5vw, 65px);
    line-height: 1.1;
    letter-spacing: -3px;
    margin: 20px 0;
}

.hero h1 span {
    display: block;
    background: linear-gradient(100deg, var(--cyan), #9b7aff, #e879f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content > p {
    max-width: 490px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 30px;
}

.button {
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 800;
    transition: .2s;
}

.button:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
}

.primary {
    background: linear-gradient(110deg, #7650e9, #397eea);
    color: white;
    box-shadow: 0 8px 25px #7050e533;
}

.secondary {
    background: var(--panel-light);
    border: 1px solid var(--border);
    color: var(--text);
}

.full-button {
    width: 100%;
    margin-top: 12px;
}

.hero-visual {
    min-height: 340px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.visual-orbit {
    position: absolute;
    width: 290px;
    height: 290px;
    border: 1px solid #8b5cf633;
    border-radius: 50%;
}

.orbit-two {
    width: 370px;
    height: 370px;
    border-color: #35d9ed22;
}

.visual-cube {
    width: 75px;
    height: 75px;
    position: absolute;
    transform: rotate(-30deg) skew(8deg, 8deg);
    border: 1px solid #ffffff44;
    border-radius: 12px;
}

.cube-purple {
    background: linear-gradient(135deg, #b17bff, #5424aa);
    top: 70px;
    left: 19%;
    transform: rotate(20deg);
    box-shadow: 0 0 50px #9c55ff66;
}

.cube-blue {
    background: linear-gradient(135deg, #54eaff, #2357bd);
    bottom: 65px;
    right: 15%;
    transform: rotate(-18deg);
    box-shadow: 0 0 50px #35d9ed44;
}

.cube-main {
    width: 145px;
    height: 145px;
    background: linear-gradient(135deg, #a77aff, #6741d9 55%, #352079);
    border-radius: 20px;
    transform: rotate(-25deg);
    box-shadow:
        20px 20px 60px #8b5cf655,
        inset -12px -12px 25px #24105c66,
        inset 10px 10px 25px #ffffff33;
}

.visual-label {
    position: absolute;
    bottom: 12px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 3px;
}

.editor-section,
.library-section {
    padding: 65px 0 25px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.section-heading h2 {
    font-size: 27px;
    letter-spacing: -1px;
    margin: 9px 0 5px;
}

.section-heading p {
    color: var(--muted);
    font-size: 12px;
}

.project-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 11px;
}

.editor-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
}

.panel {
    background: linear-gradient(145deg, #151f35, #10182a);
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 25px;
    box-shadow: 0 15px 40px #00000018;
}

.panel-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.panel-heading h3 {
    font-size: 15px;
}

.panel-heading p {
    color: var(--muted);
    font-size: 10px;
    margin-top: 4px;
}

.number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #8b5cf622;
    color: #b69aff;
    font-size: 12px;
    font-weight: 800;
}

.settings-panel label {
    display: block;
    color: #c4cde0;
    font-size: 11px;
    font-weight: 700;
    margin: 18px 0 9px;
}

.settings-panel input[type="text"],
.settings-panel select,
.ai-input-area input {
    width: 100%;
    height: 43px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: #0b1324;
    color: var(--text);
    font-size: 12px;
}

.settings-panel input:focus,
.settings-panel select:focus,
.ai-input-area input:focus {
    border-color: var(--accent);
}

.settings-panel input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #0b1324;
}

.field-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-heading output {
    color: var(--cyan);
    font-size: 11px;
    font-weight: 700;
}

.settings-panel input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.small-note {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.7;
    margin-top: 15px;
}

.preview-panel {
    min-width: 0;
}

.preview-heading {
    justify-content: space-between;
}

.preview-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-badge {
    color: var(--success);
    background: #39d98a15;
    padding: 7px 10px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.block-stage {
    height: 340px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background:
        radial-gradient(ellipse at center, #26385d 0%, #111c31 55%, #0b1324 100%);
    display: grid;
    place-items: center;
}

.stage-grid {
    position: absolute;
    inset: 0;
    opacity: .18;
    background-image:
        linear-gradient(#8c9dbb33 1px, transparent 1px),
        linear-gradient(90deg, #8c9dbb33 1px, transparent 1px);
    background-size: 30px 30px;
    transform: perspective(300px) rotateX(55deg) scale(1.7);
    transform-origin: center bottom;
}

.shape-wrap {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 180px;
    height: 180px;
}

.minecraft-block {
    position: relative;
    width: 110px;
    height: 110px;
    transform-style: preserve-3d;
    transform: rotateX(-25deg) rotateY(-35deg);
    transition: .25s;
    animation: floating 4s ease-in-out infinite;
}

.block-top,
.block-front,
.block-side {
    position: absolute;
    border: 1px solid #ffffff55;
}

.block-top {
    width: 110px;
    height: 110px;
    transform: rotateX(90deg) translateZ(55px);
    filter: brightness(1.3);
}

.block-front {
    width: 110px;
    height: 110px;
    transform: translateZ(55px);
}

.block-side {
    width: 110px;
    height: 110px;
    transform: rotateY(90deg) translateZ(55px);
    filter: brightness(.65);
}

@keyframes floating {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -10px; }
}

.stage-caption {
    position: absolute;
    bottom: 15px;
    color: #8290aa;
    font-size: 9px;
    letter-spacing: 2px;
}

.preview-information {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 22px 0;
}

.muted {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 1px;
}

.preview-information h2 {
    font-size: 19px;
    margin-top: 6px;
}

.color-swatch {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    border: 2px solid #ffffff55;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    padding-top: 18px;
    gap: 10px;
}

.preview-stats div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-stats span {
    color: var(--muted);
    font-size: 9px;
}

.preview-stats strong {
    font-size: 12px;
}

.creation-count {
    color: var(--cyan);
    background: #35d9ed14;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 11px;
}

.creation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.empty-state {
    color: var(--muted);
    font-size: 13px;
    padding: 25px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    grid-column: 1 / -1;
    text-align: center;
}

.creation-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 17px;
    transition: .2s;
}

.creation-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.creation-color {
    height: 85px;
    border-radius: 9px;
    margin-bottom: 15px;
    box-shadow: inset 0 -15px 25px #00000022;
}

.creation-card h3 {
    font-size: 14px;
    margin-bottom: 7px;
}

.creation-card p {
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 14px;
}

.creation-actions {
    display: flex;
    gap: 8px;
}

.creation-actions button {
    flex: 1;
    padding: 9px 5px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--panel-light);
    color: var(--text);
    font-size: 10px;
    font-weight: 700;
}

.creation-actions button:hover {
    border-color: var(--cyan);
}

.ai-section {
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 75px 0;
    background:
        radial-gradient(circle at 90% 20%, #8b5cf622, transparent 40%),
        var(--panel);
}

.ai-icon {
    min-width: 65px;
    height: 65px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #8b5cf6, #35d9ed);
    color: white;
    font-size: 28px;
}

.ai-content {
    width: 100%;
}

.ai-content h2 {
    font-size: 24px;
    margin: 10px 0;
}

.ai-content p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 18px;
}

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

.ai-input-area button:disabled,
.ai-input-area input:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.coming-soon {
    display: inline-block;
    color: #b69aff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-top: 13px;
}

.about-section {
    padding: 20px 0 80px;
    text-align: center;
}

.about-section h2 {
    font-size: 25px;
    margin: 15px 0;
}

.about-section p {
    max-width: 600px;
    margin: auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

footer {
    min-height: 75px;
    padding: 20px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
}

footer strong {
    color: var(--text);
    letter-spacing: 1px;
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translate(-50%, 100px);
    background: #172b3b;
    border: 1px solid var(--cyan);
    color: white;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 12px;
    opacity: 0;
    transition: .3s;
    z-index: 50;
    pointer-events: none;
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

body.light-theme {
    --background: #edf2fc;
    --panel: #ffffff;
    --panel-light: #e9eef9;
    --border: #d5deee;
    --text: #17233d;
    --muted: #687793;
}

body.light-theme .topbar {
    background: rgba(237,242,252,.92);
}

body.light-theme .settings-panel input[type="text"],
body.light-theme .settings-panel select,
body.light-theme .ai-input-area input {
    background: #f5f7fc;
    color: #17233d;
}

body.light-theme .secondary,
body.light-theme .creation-actions button {
    color: #17233d;
}

@media (max-width: 850px) {
    .topbar {
        padding: 15px 5%;
        flex-wrap: wrap;
    }

    nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 17px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content > p {
        margin-left: auto;
        margin-right: auto;
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 280px;
    }
}

@media (max-width: 520px) {
    .main-container {
        padding: 0 16px;
    }

    .logo small {
        display: none;
    }

    nav {
        gap: 12px;
        font-size: 10px;
    }

    .server-status {
        display: none;
    }

    .section-heading h2 {
        font-size: 22px;
    }

    .panel {
        padding: 17px;
    }

    .block-stage {
        height: 260px;
    }

    .ai-section {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai-input-area {
        flex-direction: column;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }
}
