:root {
    --fu-dark-green: #1a3c34;
    --fu-bg-card: #ffffff;
    --fu-text: #222222;
    --fu-accent-cyan: #4fc3f7;
    --fu-value-green: #00e676;
}

body {
    font-family: 'Signika Negative', sans-serif;
    background: #121216;
    color: #eee;
    padding: 20px;
    display: flex;
    gap: 30px;
    min-height: 100vh;
    box-sizing: border-box;
    margin: 0;
}

#creator-panel {
    width: 460px;
    background: #1c1c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    align-self: flex-start;
}

h2 {
    margin-top: 0;
    font-size: 18px;
    text-align: center;
    color: var(--fu-accent-cyan);
    border-bottom: 1px solid #333;
    padding-bottom: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.config-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
    align-items: end;
    margin-bottom: 8px;
    background: #23232e;
    padding: 6px 10px;
    border-radius: 4px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.main-name-group, .desc-group, .wada-desc-group {
    margin-bottom: 8px; 
    background: #23232e; 
    padding: 6px 10px; 
    border-radius: 4px;
}

label {
    margin-bottom: 4px;
    font-size: 13px;
    color: #aaa;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 6px;
    background: #282835;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

textarea {
    height: 44px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 28px;
}

.checkbox-group input {
    width: auto;
}

.live-calc {
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    color: var(--fu-value-green);
    text-align: right;
    padding-bottom: 2px;
    font-weight: bold;
}

.live-calc.wada-val {
    color: #ff5252;
}

.total-summary {
    margin-top: 12px;
    border-top: 2px dashed #444;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
}

.total-row .val {
    font-family: 'Share Tech Mono', monospace;
    font-size: 22px;
    font-weight: bold;
    color: var(--fu-value-green);
}

.total-row .val.cyan {
    color: var(--fu-accent-cyan);
}

button {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: #00796b;
    color: white;
    margin-top: 12px;
}

.btn-primary:hover {
    background: #004d40;
}

.json-buttons {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.btn-secondary {
    background: #3a3a4c;
    color: #ddd;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #4a4a5e;
}

#preview-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#project-card {
    width: 1000px;
    background: var(--fu-bg-card);
    color: var(--fu-text);
    border: 4px solid var(--fu-dark-green);
    padding: 0;
    box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}

.fu-table-header {
    background: var(--fu-dark-green);
    color: #ffffff;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    font-family: 'Share Tech Mono', monospace;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border-bottom: 2px solid var(--fu-dark-green);
}

.fu-table-header div {
    padding: 8px 4px;
    border-right: 2px solid rgba(255,255,255,0.2);
}

.fu-table-header div:last-child {
    border-right: none;
}

.fu-row-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    text-align: center;
    font-size: 28px;
    border-bottom: 4px solid var(--fu-dark-green);
    background: #f9f9f9;
}

.fu-row-inputs div {
    padding: 12px 4px;
    font-weight: bold;
    border-right: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fu-row-inputs div:last-child {
    border-right: none;
}

.fu-name-cell {
    justify-content: flex-start !important;
    padding-left: 16px !important;
    color: var(--fu-dark-green);
    font-size: 30px;
}

.fu-summary-bar {
    background: #f0f4f1;
    padding: 12px 16px;
    font-size: 26px;
    border-bottom: 2px solid #ccc;
    color: #111;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fu-summary-bar strong {
    color: #000;
}

.fu-description {
    padding: 24px;
    font-size: 28px;
    line-height: 1.45;
    white-space: pre-wrap;
    background: #fff;
    min-height: 100px;
}

.fu-wada-description {
    padding: 20px 24px 24px 24px;
    font-size: 28px;
    line-height: 1.45;
    background: #fff5f5;
    border-top: 2px dashed #ffc1c1;
    color: #c62828;
}

.fu-wada-description strong {
    color: #b71c1c;
}

.lang-switcher-panel {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.btn-lang {
    width: auto;
    padding: 4px 10px;
    font-size: 12px;
    background: #282835;
    border: 1px solid #444;
    color: #888;
    border-radius: 4px;
    cursor: pointer;
}

.btn-lang:hover {
    background: #343446;
    color: #fff;
}

.btn-lang.active {
    background: var(--fu-accent-cyan);
    color: #121216;
    border-color: var(--fu-accent-cyan);
    font-weight: bold;
}

.back-link-container {
    float: left;
}

#creator-panel h2 {
    clear: both;
    padding-top: 10px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 4px 0;
}

.btn-back .arrow {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.btn-back:hover {
    color: var(--fu-accent-cyan);
}

.btn-back:hover .arrow {
    transform: translateX(-3px) rotate(-20deg);
}

@media (max-width: 1100px) {
    body {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    #creator-panel {
        width: 100%;
        max-width: 460px;
        margin-bottom: 20px;
    }

    #preview-area {
        width: 100%;
        max-width: 100vw;
        overflow-x: auto;
        padding-bottom: 15px;
        justify-content: flex-start;
    }

    .fu-table-header {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .config-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .live-calc {
        text-align: left;
        font-size: 16px;
        padding-bottom: 10px;
        border-bottom: 1px dashed #444;
    }
    
    .config-row:last-of-type .live-calc {
        border-bottom: none;
    }
}