:root {
    --mars-orange: #ff5e00;
    --paper: #e3d3b0;
    --danger: #ff3131;
}

body {
    background: #0a0503 url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    color: #2c1108;
}

/* Червона пульсація тривоги по краях */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.3);
    animation: alarm 3s infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes alarm {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Координати (Пункт 6в) */
#mars-coords {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--mars-orange);
    font-size: 12px;
    letter-spacing: 2px;
    opacity: 0.7;
}

.paper-note {
    background: var(--paper);
    padding: 50px;
    width: 450px;
    box-shadow: 20px 20px 0px rgba(0,0,0,0.5);
    border-radius: 2px;
    position: relative;
    transform: rotate(-1deg);
}

.stamp {
    position: absolute;
    top: 20px;
    right: 20px;
    border: 3px solid #8b0000;
    color: #8b0000;
    padding: 5px;
    font-weight: bold;
    transform: rotate(15deg);
    opacity: 0.5;
}

h2 { border-bottom: 2px solid #2c1108; padding-bottom: 10px; }

.warning {
    color: #8b0000;
    font-weight: bold;
    text-align: center;
    border: 1px dashed #8b0000;
    padding: 10px;
}

.btn-group { margin-top: 30px; }

.start-btn {
    display: block;
    background: #2c1108;
    color: var(--paper);
    text-align: center;
    padding: 15px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid transparent;
    transition: 0.3s;
}

.start-btn:hover {
    background: transparent;
    color: #2c1108;
    border-color: #2c1108;
}

.sub-btns {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.sub-btns button {
    background: none;
    border: 1px solid #2c1108;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    padding: 5px 10px;
}

/* Помилка зв'язку */
.error-msg {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger);
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    display: none;
    z-index: 10;
}