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

body {
    background-color: #0d0d1a;
    color: #e0e0e0;
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    overflow: hidden;
    text-align: center;
}

.screen {
    width: 100vw;
    height: 100vh;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
}

.screen.active {
    display: flex;
}

#game-container {
    background-image: url(./background.png);
    background-size: cover;
}

h1 {
    font-size: 4rem;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff, 0 0 15px #00ffff, 0 0 30px #00ffff, 0 0 50px #00aaff;
    margin-bottom: 40px;
}

button {
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 15px 30px;
    font-size: 1.5em;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    margin: 10px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 5px #00ffff, inset 0 0 5px #00ffff;
}

button:hover {
    background: #00ffff;
    color: #0d0d1a;
    box-shadow: 0 0 20px #00ffff, inset 0 0 10px #00ffff;
}

button:disabled {
    border-color: #447777;
    color: #447777;
    cursor: not-allowed;
    background: transparent;
    box-shadow: none;
}

#game-canvas {
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.overlay.active {
    display: flex;
}

#progress-container {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 500px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ffff;
    border-radius: 5px;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background-color: #00ffff;
    transition: width 0.1s linear;
}

#pause-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 5px 15px;
    font-size: 1.5rem;
    z-index: 10;
    margin: 5px;
}

#skin-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    max-width: 600px;
    padding: 20px;
}

.skin-option {
    border: 3px solid #666;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.skin-option img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.skin-option p {
    margin-top: 10px;
    font-size: 1.1em;
}

.skin-option:hover {
    border-color: #fff;
}

.skin-option.selected {
    border-color: #00ffff;
    box-shadow: 0 0 15px #00ffff;
    transform: scale(1.05);
}

/* Builder Mode Styles */
#build-screen {
    justify-content: flex-start;
    padding-top: 20px;
}

#build-screen h1 {
    margin-bottom: 20px;
}

#builder-ui {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 95%;
    max-width: 1400px;
    height: 70vh;
    max-height: 600px;
}

#build-canvas {
    flex-grow: 1;
    background-color: rgba(0,0,0,0.2);
    border: 2px solid #00aaff;
    cursor: crosshair;
}

#builder-toolbar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(0, 30, 40, 0.5);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #00aaff;
    color: #e0e0e0;
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.tool-group strong {
    font-size: 1.2em;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    margin-bottom: 5px;
}

#builder-toolbar button {
    padding: 10px;
    width: 80px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1em;
}

#builder-toolbar .tool-btn,
#builder-toolbar .item-btn {
    border-width: 2px;
    border-color: #666;
    box-shadow: none;
}

#builder-toolbar .tool-btn.active,
#builder-toolbar .item-btn.active {
    border-color: #00ffff;
    box-shadow: 0 0 10px #00ffff;
}

.item-btn img {
    width: 40px;
    height: 40px;
}

.block-preview {
    width: 35px;
    height: 35px;
    background-color: #00aaff;
    border: 2px solid #00ffff;
}