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

html{
    scroll-behavior:smooth;
}

body{
    font-family:"Trebuchet MS","Segoe UI",sans-serif;
    background:#d5d7d8;
    color:#202427;
    line-height:1.5;
}

::-webkit-scrollbar{
    width:11px;
}

::-webkit-scrollbar-track{
    background:#b7bbbd;
}

::-webkit-scrollbar-thumb{
    background:#4d5559;
    border-radius:4px;
}

::-webkit-scrollbar-thumb:hover{
    background:#30363a;
}

header{
    background:
        repeating-linear-gradient(
            0deg,
            #30383c 0px,
            #30383c 3px,
            #353e42 3px,
            #353e42 6px
        );
    color:#f2f3f3;
    text-align:left;
    padding:35px 7%;
    border-bottom:7px solid #e08b18;
    box-shadow:0 4px 0 #171b1d;
}

header h1{
    font-family:"Courier New",monospace;
    font-size:3rem;
    letter-spacing:4px;
    text-transform:uppercase;
    margin-bottom:8px;
}

header p{
    color:#cbd0d2;
    margin-top:4px;
    font-size:1rem;
}

nav{
    background:#202629;
    position:sticky;
    top:0;
    z-index:999;
    border-bottom:2px solid #596166;
}

nav ul{
    list-style:none;
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
}

nav li{
    border-right:1px solid #41494d;
}

nav a{
    display:block;
    padding:14px 21px;
    color:#e7e9ea;
    text-decoration:none;
    font-family:"Courier New",monospace;
    font-size:.9rem;
    font-weight:bold;
    text-transform:uppercase;
    transition:.2s;
}

nav a:hover{
    background:#e08b18;
    color:#16191a;
}

main{
    width:92%;
    max-width:1350px;
    margin:30px auto;
}

section{
    background:#eceeef;
    border:2px solid #92999d;
    border-radius:4px;
    padding:28px;
    margin-bottom:30px;
    box-shadow:5px 5px 0 #9da2a4;
}

section h2{
    text-align:left;
    font-family:"Courier New",monospace;
    font-size:1.7rem;
    color:#30383c;
    text-transform:uppercase;
    letter-spacing:2px;
    margin-bottom:24px;
    padding-bottom:10px;
    border-bottom:3px solid #e08b18;
}

hr{
    display:none;
}

#dashboard{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
    gap:14px;
}

#dashboard h2{
    grid-column:1/-1;
}

#dashboard div{
    background:#cfd3d5;
    border:2px solid #8b9296;
    border-left:7px solid #555d61;
    border-radius:3px;
    padding:17px;
    transition:.2s;
}

#dashboard div:hover{
    transform:translate(-2px,-2px);
    border-left-color:#e08b18;
    box-shadow:4px 4px 0 #9da2a4;
}

#dashboard div h3{
    color:#4a5358;
    font-family:"Courier New",monospace;
    font-size:.9rem;
    text-transform:uppercase;
    margin-bottom:8px;
}

#dashboard div p{
    font-size:1.3rem;
    font-weight:bold;
}

#money{
    color:#26753a;
}

#factory-level{
    color:#c56d00;
}

#electricity{
    color:#b6382d;
}

#workers{
    color:#5c4380;
}

#reputation{
    color:#315f82;
}

#factory{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(285px,1fr));
    gap:18px;
}

#factory h2{
    grid-column:1/-1;
}

#factory article{
    background:#dfe2e3;
    border:2px solid #969da1;
    border-radius:4px;
    padding:20px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    min-height:330px;
    transition:.2s;
}

#factory article:hover{
    transform:translate(-3px,-3px);
    border-color:#e08b18;
    box-shadow:5px 5px 0 #9da2a4;
}

#factory article h3{
    font-family:"Courier New",monospace;
    color:#30383c;
    text-transform:uppercase;
    font-size:1.25rem;
    margin-bottom:9px;
}

#factory article p{
    color:#4f575b;
    margin-bottom:14px;
}

#factory article ul{
    list-style:none;
    margin-bottom:18px;
}

#factory article ul li{
    background:#c9cdcf;
    border-left:4px solid #687176;
    padding:8px 11px;
    margin-bottom:6px;
    font-family:"Courier New",monospace;
    font-size:.88rem;
}

#factory button{
    width:100%;
    font-family:"Courier New",monospace;
    font-weight:bold;
    font-size:.9rem;
    background:#3d464a;
    color:#fff;
    border:2px solid #252b2e;
    padding:11px 14px;
    border-radius:3px;
    cursor:pointer;
    transition:.2s;
}

#factory button:hover{
    background:#e08b18;
    color:#171a1b;
    border-color:#9b5e08;
}

.robotCardInfo{
    margin-top:16px;
    border-top:2px solid #aab0b3;
    padding-top:12px;
}

.robotCardInfo p{
    margin:6px 0;
    color:#30383c;
    font-family:"Courier New",monospace;
    font-weight:bold;
}

#upgrades{
    text-align:center;
}

#upgrades button{
    margin:7px;
    border:2px solid #8e5a0b;
    font-family:"Courier New",monospace;
    font-weight:bold;
    font-size:.9rem;
    background:#e08b18;
    color:#171a1b;
    padding:13px 19px;
    border-radius:3px;
    cursor:pointer;
    transition:.2s;
}

#upgrades button:hover{
    background:#f0a52b;
    transform:translateY(-2px);
    box-shadow:3px 3px 0 #8f9699;
}

#upgrades + hr + h3{
    background:#30383c;
    color:#fff;
    width:92%;
    max-width:1350px;
    margin:0 auto 14px;
    padding:14px 20px;
    border-left:7px solid #e08b18;
    font-family:"Courier New",monospace;
    text-transform:uppercase;
    letter-spacing:1px;
}

#upgrades + hr + h3 + p,
#upgrades + hr + h3 + p + p,
#upgrades + hr + h3 + p + p + p,
#upgrades + hr + h3 + p + p + p + p,
#upgrades + hr + h3 + p + p + p + p + p{
    width:92%;
    max-width:1350px;
    margin-left:auto;
    margin-right:auto;
    background:#dfe2e3;
    border:1px solid #999fa2;
    border-left:6px solid #626a6e;
    padding:12px 18px;
    margin-bottom:8px;
    font-family:"Courier New",monospace;
    font-weight:bold;
}

#machineLevel,
#conveyorLevel,
#solarLevel,
#toolLevel,
#workerSkill{
    color:#a45f05;
}

#orders{
    text-align:center;
}

.orderCard{
    max-width:500px;
    margin:auto;
    background:#d7dadb;
    border:3px solid #555e62;
    border-radius:3px;
    padding:24px;
    box-shadow:5px 5px 0 #a0a5a7;
}

.orderCard h3{
    color:#30383c;
    font-family:"Courier New",monospace;
    text-transform:uppercase;
    margin-bottom:18px;
}

.orderCard p{
    margin:11px 0;
    font-family:"Courier New",monospace;
    font-weight:bold;
}

.orderCard button{
    margin-top:16px;
    width:100%;
    padding:13px;
    background:#347a43;
    color:white;
    border:2px solid #24582f;
    border-radius:3px;
    cursor:pointer;
    font-family:"Courier New",monospace;
    font-weight:bold;
    transition:.2s;
}

.orderCard button:hover{
    background:#429956;
    transform:translateY(-2px);
}

#orderProgress{
    width:100%;
    height:22px;
    margin-top:15px;
}

#statistics{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:14px;
}

#statistics h2{
    grid-column:1/-1;
}

#statistics p{
    font-size:1rem;
    font-weight:bold;
    font-family:"Courier New",monospace;
    background:#d8dcdd;
    border:2px solid #999fa2;
    border-left:6px solid #555d61;
    padding:16px;
}

#statistics span{
    color:#315f82;
}

#achievements ul{
    list-style:none;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:12px;
}

#achievements li{
    background:#d9dcdd;
    border:2px solid #9a9fa1;
    border-left:6px solid #e08b18;
    padding:15px;
    font-family:"Courier New",monospace;
    font-weight:bold;
}

#achievements li:hover{
    background:#e2e4e5;
}

#settings{
    text-align:center;
}

#settings button{
    margin:8px;
    border:2px solid #252b2e;
    font-family:"Courier New",monospace;
    font-weight:bold;
    background:#3d464a;
    color:#fff;
    padding:13px 23px;
    border-radius:3px;
    cursor:pointer;
    transition:.2s;
}

#settings button:hover{
    background:#e08b18;
    color:#171a1b;
}

footer{
    text-align:center;
    padding:24px;
    background:#202629;
    color:#cbd0d2;
    border-top:5px solid #e08b18;
    font-family:"Courier New",monospace;
    font-size:.85rem;
    margin-top:45px;
}

#robotWorkshop{
    position:fixed;
    inset:0;
    background:rgba(20,24,26,.94);
    display:flex;
    justify-content:center;
    align-items:center;
    padding:25px;
    z-index:1000;
}

#robotWorkshop[hidden]{
    display:none;
}

.workshop-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#252d30;
    color:white;
    padding:15px 20px;
    border:3px solid #596166;
    border-bottom:4px solid #e08b18;
}

.workshop-header h2{
    font-family:"Courier New",monospace;
    font-size:1.4rem;
    letter-spacing:1px;
}

#closeWorkshopButton{
    background:#9e3029;
    border:2px solid #64201c;
    border-radius:3px;
    width:42px;
    height:42px;
    color:white;
    font-size:1.5rem;
    cursor:pointer;
    transition:.2s;
}

#closeWorkshopButton:hover{
    background:#d14940;
}

.workshop-body{
    background:#c7cbcd;
    width:100%;
    max-width:1200px;
    height:80vh;
    display:grid;
    grid-template-columns:230px 1fr 230px;
    overflow:hidden;
    border:3px solid #596166;
    box-shadow:8px 8px 0 rgba(0,0,0,.35);
}

.parts-panel,
.tools-panel{
    background:#343c40;
    color:#fff;
    padding:20px;
    overflow-y:auto;
}

.parts-panel h3,
.tools-panel h3{
    margin-bottom:18px;
    color:#e08b18;
    text-align:center;
    font-family:"Courier New",monospace;
    text-transform:uppercase;
    font-size:1rem;
}

.parts-panel button,
.tools-panel button{
    display:block;
    width:100%;
    margin-bottom:11px;
    padding:12px;
    background:#4b555a;
    color:#fff;
    border:2px solid #697277;
    border-radius:3px;
    cursor:pointer;
    transition:.2s;
    font-family:"Courier New",monospace;
    font-weight:bold;
}

.parts-panel button:hover,
.tools-panel button:hover{
    background:#e08b18;
    color:#1c2022;
    border-color:#9c630d;
}

.assembly-panel{
    background:#e2e5e6;
    padding:20px;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.assembly-panel h3{
    margin-bottom:14px;
    color:#30383c;
    font-family:"Courier New",monospace;
    text-transform:uppercase;
}

#assemblyCanvas{
    flex:1;
    width:100%;
    background:
        linear-gradient(#c4c9cb 1px,transparent 1px),
        linear-gradient(90deg,#c4c9cb 1px,transparent 1px);
    background-size:25px 25px;
    background-color:#e7e9ea;
    border:3px dashed #777f83;
    border-radius:3px;
    display:flex;
    justify-content:center;
    align-items:center;
}

#robotPreview{
    width:260px;
    height:360px;
    border:3px solid #555e62;
    background:#d9dcdd;
    border-radius:3px;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:0;
    color:#30383c;
    position:relative;
}

#robotPreview::before{
    content:"";
    width:95px;
    height:95px;
    border:8px solid #596166;
    border-radius:8px;
    position:absolute;
    top:65px;
}

#robotPreview::after{
    content:"";
    width:130px;
    height:120px;
    border:8px solid #596166;
    border-radius:8px;
    position:absolute;
    top:175px;
}

#assemblyProgress{
    width:100%;
    height:24px;
    margin:15px 0;
}

#robotStatus,
#paintStatus,
#aiStatus,
#qualityStatus{
    font-family:"Courier New",monospace;
    font-weight:bold;
    color:#315f82;
}

#workspaceLog{
    margin-top:15px;
    background:#202629;
    color:#bfc5c7;
    border:2px solid #596166;
    border-radius:3px;
    padding:13px;
    min-height:170px;
    overflow-y:auto;
    text-align:left;
    font-family:"Courier New",monospace;
    font-size:.82rem;
    line-height:1.6;
}

progress{
    appearance:none;
    width:100%;
    height:20px;
}

progress::-webkit-progress-bar{
    background:#b7bdc0;
    border:1px solid #8d9497;
}

progress::-webkit-progress-value{
    background:#e08b18;
}

progress::-moz-progress-bar{
    background:#e08b18;
}

@media(max-width:950px){

    .workshop-body{
        grid-template-columns:1fr;
        height:90vh;
        overflow-y:auto;
    }

    .parts-panel,
    .assembly-panel,
    .tools-panel{
        width:100%;
    }

    #robotPreview{
        width:180px;
        height:260px;
    }

}

@media(max-width:768px){

    nav ul{
        flex-direction:column;
    }

    nav li{
        border-right:none;
        border-bottom:1px solid #41494d;
    }

    nav a{
        text-align:center;
    }

    #dashboard,
    #factory,
    #statistics,
    #achievements ul{
        grid-template-columns:1fr;
    }

    section{
        padding:20px;
    }

    header{
        padding:30px 6%;
    }

    header h1{
        font-size:2.1rem;
    }

    main{
        width:94%;
    }
}

#tutorialOverlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.75);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:2000;
    padding:20px;
}

#tutorialBox{
    background:white;
    width:100%;
    max-width:550px;
    padding:35px;
    border-radius:20px;
    text-align:center;
    box-shadow:0 20px 50px rgba(0,0,0,.3);
}

#tutorialBox h2{
    color:#1565c0;
    margin-bottom:20px;
    font-size:2rem;
}

#tutorialText{
    font-size:1.15rem;
    margin-bottom:25px;
    min-height:80px;
}

#tutorialBox button{
    border:none;
    background:#1565c0;
    color:white;
    padding:11px 20px;
    margin:5px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}

#tutorialBox button:hover{
    background:#0d47a1;
}

#tutorialBox button:disabled{
    background:#b0bec5;
    cursor:not-allowed;
}

#tutorialSkip{
    background:#607d8b !important;
}