* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111;
    color: #eee;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, #2b2b2b, #080808);
}

.login-box {
    width: 360px;
    background: #1b1b1b;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.login-box h1 {
    margin: 0 0 8px;
    font-size: 26px;
}

.login-box p {
    margin: 0 0 22px;
    color: #aaa;
}

.login-box input {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #444;
    background: #111;
    color: #eee;
}

.login-box button,
.topbar button,
.stage-toolbar button,
.right-panel button,
.timeline button {
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: #d5ff3f;
    color: #111;
    cursor: pointer;
    font-weight: bold;
}

.error {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 10px;
    background: #4b1616;
    color: #ffb6b6;
}

.editor-body {
    height: 100vh;
    overflow: hidden;
}

.topbar {
    height: 58px;
    padding: 0 18px;
    background: #171717;
    border-bottom: 1px solid #303030;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: bold;
    font-size: 18px;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.topbar-actions a {
    color: #ddd;
    text-decoration: none;
}

.studio-layout {
    height: calc(100vh - 58px - 92px);
    display: grid;
    grid-template-columns: 260px 1fr 280px;
}

.left-panel,
.right-panel {
    background: #181818;
    border-right: 1px solid #303030;
    padding: 16px;
    overflow: auto;
}

.right-panel {
    border-right: 0;
    border-left: 1px solid #303030;
}

.left-panel h2,
.right-panel h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.asset-tab {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 10px;
    background: #222;
    color: #eee;
    text-align: left;
    cursor: pointer;
}

.asset-tab.active {
    background: #303b16;
    border-color: #d5ff3f;
}

.upload-box {
    margin-top: 20px;
    padding: 14px;
    border: 1px dashed #555;
    border-radius: 12px;
    color: #aaa;
}

.stage-wrap {
    background: #0c0c0c;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.stage-toolbar {
    height: 48px;
    padding: 8px;
    display: flex;
    gap: 8px;
    background: #151515;
    border-bottom: 1px solid #303030;
}

.stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background:
        linear-gradient(45deg, #121212 25%, transparent 25%),
        linear-gradient(-45deg, #121212 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #121212 75%),
        linear-gradient(-45deg, transparent 75%, #121212 75%);
    background-size: 32px 32px;
    background-position: 0 0, 0 16px, 16px -16px, -16px 0;
}

.frame {
    width: 960px;
    height: 540px;
    border: 2px solid #d5ff3f;
    background: #202020;
    overflow: hidden;

    transform: scale(0.5);
    transform-origin: center center;
}

.right-panel label {
    display: block;
    margin-bottom: 12px;
    color: #aaa;
}

.right-panel input {
    width: 100%;
    margin-top: 5px;
    padding: 9px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #101010;
    color: #eee;
}

.right-panel button {
    width: 100%;
    margin-bottom: 8px;
}

.right-panel .danger {
    background: #8d2c2c;
    color: #fff;
}

.timeline {
    height: 92px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    background: #171717;
    border-top: 1px solid #303030;
}

.shot {
    width: 130px;
    height: 68px;
    border: 1px solid #444;
    border-radius: 10px;
    background: #242424;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.shot.active {
    border-color: #d5ff3f;
    color: #fff;
}

#konva-stage {
    width: 1920px;
    height: 1080px;
}