/* NeoWeaver — Deployment UI (campaign ↔ world)
 * Font: Chakra Petch | Accent: #adff00
 * v19: sidebar padding reduced, btn-deploy as <a> fix
 */

.tw-deployment-main-container *,
.tw-deployment-main-container *::before,
.tw-deployment-main-container *::after {
    box-sizing: border-box;
}

/* ── Root container ── */
.tw-deployment-main-container {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Chakra Petch', sans-serif;
    background: #000;
    border: 1px solid #1a1a1a;
    position: relative;
    overflow: hidden;
}

/* ── Hero ── */
.tw-briefing-hero {
    position: relative;
    height: 250px;
    background: #111 url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=1200') center / cover;
    display: flex;
    align-items: center;
    padding: 0 40px;
    border-bottom: 2px solid #adff00;
}
.tw-hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to right, #000 40%, transparent 100%);
}
.tw-hero-content {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}
.tw-hero-text h1 {
    color: #adff00;
    font-size: 2.5rem;
    margin: 0;
    line-height: 1;
    letter-spacing: 2px;
}
.tw-hero-text p {
    color: #888;
    max-width: 450px;
    font-size: 0.9rem;
    margin-top: 10px;
}
.tw-label-alt {
    color: #ff0055;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 5px;
}

/* ── Hero stats ── */
.tw-hero-stats {
    display: flex;
    gap: 30px;
}
.tw-hero-stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.tw-hero-stat-item .n {
    color: #adff00;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
    font-family: monospace;
    transition: 0.1s;
}
.tw-hero-stat-item .l {
    color: #444;
    font-size: 0.6rem;
    letter-spacing: 1px;
    font-weight: bold;
    margin-top: 4px;
}
.tw-pulse-stat .n {
    color: #00e5ff;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    animation: tw-status-pulse 2s infinite;
}
@keyframes tw-status-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
.n-glitch {
    filter: brightness(2) contrast(1.5);
    transform: scale(1.05);
}

/* ── Layout ── */
.tw-deploy-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 40px;
}

/* ── Console log ── */
.tw-console-box {
    background: #050505;
    border-left: 3px solid #00e5ff;
    padding: 15px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #00e5ff;
    margin-bottom: 30px;
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.05);
}

/* ── Selection grid: 2 columns (no agent) ── */
.tw-selection-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* ── Field boxes ── */
.tw-field-box label {
    display: block;
    color: #adff00;
    font-size: 0.75rem;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
}
.tw-input-cyber {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    font-size: 0.8rem;
    margin-bottom: 5px;
    border-radius: 0;
    outline: none;
}
.tw-input-cyber:focus {
    border-color: #adff00;
}
.tw-select-cyber {
    width: 100%;
    background: #080808;
    border: 1px solid #222;
    color: #00e5ff;
    padding: 10px;
    font-size: 0.9rem;
    outline: none;
    border-radius: 0;
    cursor: pointer;
}
.tw-select-cyber option {
    padding: 8px;
}

/* ── Deploy button (button + a) ── */
.tw-btn-deploy,
a.tw-btn-deploy {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #adff00;
    text-color: #000 !important;
    border: none;
    font-weight: 900;
    font-size: 0.85rem;
    cursor: pointer;
    clip-path: polygon(0 0, 98% 0, 100% 20%, 100% 100%, 2% 100%, 0 80%);
    transition: 0.3s;
    letter-spacing: 2px;
    font-family: 'Chakra Petch', sans-serif;
    text-decoration: none !important;
    text-align: center;
    line-height: 1.2;
    box-sizing: border-box;
}
.tw-btn-deploy:hover:not(:disabled),
a.tw-btn-deploy:hover {
    background: #fff;
    color: #000 !important;
    transform: translateY(-2px);
}
.tw-btn-deploy:disabled {
    background: #1a1a1a;
    color: #333 !important;
    cursor: not-allowed;
}

/* ── Sidebar ── */
.tw-sidebar-card {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    padding: 7px 8px;
    border-radius: 2px;
}
.tw-sidebar-card + .tw-sidebar-card {
    margin-top: 5px;
}
.tw-sidebar-card h4 {
    color: #adff00;
    margin: 0 0 6px 0;
    font-size: 0.8rem;
    letter-spacing: 1px;
}
.tw-sidebar-card p {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

/* ── Glitch shake on success ── */
.tw-glitch-shake {
    animation: tw-shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border-color: #ff0055 !important;
    box-shadow: 0 0 40px rgba(255, 0, 85, 0.4);
}
@keyframes tw-shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d( 2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d( 4px, 0, 0); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .tw-selection-group {
        grid-template-columns: 1fr;
    }
    .tw-deploy-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}
