* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}


/* NAVBAR */

.navbar {
    width: 100%;
    padding: 18px 6%;
    background: #111827;
    border-bottom: 1px solid #1e293b;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #06b6d4;
    color: #082f49;

    font-weight: bold;
    border-radius: 10px;
}

.brand h1 {
    font-size: 18px;
}

.brand p {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 3px;
}


/* CONNECTION */

.connection {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 14px;
    color: #94a3b8;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
}


/* MAIN */

.container {
    width: 88%;
    max-width: 1200px;
    margin: 35px auto;
}


/* STATUS */

.status-card {
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 18px;

    padding: 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;
}

.status-card h2 {
    margin-top: 5px;
}

.description {
    color: #64748b;
    margin-top: 5px;
}


/* GRID */

.grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}


/* CARD */

.card {
    background: #111827;
    border: 1px solid #1e293b;

    border-radius: 18px;

    padding: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 22px;
}

.card-header h2 {
    font-size: 20px;
    margin-top: 5px;
}

.icon {
    font-size: 25px;
    color: #06b6d4;
}

.label {
    color: #06b6d4;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}


/* INPUT */

label {
    display: block;
    font-size: 14px;
    margin-bottom: 9px;
    color: #cbd5e1;
}

textarea,
select {
    width: 100%;

    background: #0f172a;

    color: white;

    border: 1px solid #334155;

    border-radius: 10px;

    padding: 13px;

    outline: none;

    font-size: 14px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

textarea:focus,
select:focus {
    border-color: #06b6d4;
}

.char-count {
    text-align: right;
    color: #64748b;
    font-size: 12px;
    margin-top: 5px;
}


/* BUTTON */

.btn {
    border: none;

    padding: 12px 18px;

    border-radius: 10px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.primary {
    background: #06b6d4;
    color: #083344;
}

.success {
    background: #22c55e;
    color: #052e16;
}

.danger {
    background: #ef4444;
    color: white;
}

.full {
    width: 100%;
    margin-top: 15px;
}


/* CONTROL */

.control-group {
    margin-bottom: 22px;
}

.button-row {
    display: flex;
    gap: 10px;
}

.button-row .btn {
    flex: 1;
}


/* SPEED */

.range-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

input[type="range"] {
    width: 100%;
    accent-color: #06b6d4;
}

#speedValue {
    min-width: 25px;
    text-align: center;
    font-weight: bold;
}


/* PREVIEW */

.led-panel {
    background: #020617;

    border: 5px solid #1e293b;

    border-radius: 8px;

    height: 120px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    color: #ef4444;

    font-family: monospace;

    font-size: 28px;

    font-weight: bold;

    text-shadow:
        0 0 5px #ef4444,
        0 0 12px #ef4444;
}

.preview-info {
    text-align: center;

    color: #64748b;

    font-size: 12px;

    margin-top: 10px;
}


/* LOG */

.logs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.log {
    display: flex;
    gap: 10px;

    padding: 12px;

    background: #0f172a;

    border-radius: 10px;
}

.log-dot {
    width: 8px;
    height: 8px;

    background: #06b6d4;

    border-radius: 50%;

    margin-top: 5px;
}

.log strong {
    font-size: 13px;
}

.log p {
    color: #64748b;
    font-size: 12px;

    margin-top: 3px;
}


/* FOOTER */

footer {
    text-align: center;

    padding: 25px;

    color: #475569;

    font-size: 12px;
}


/* ========================= */
/* TABLET */
/* ========================= */

@media (max-width: 800px) {

    .grid {
        grid-template-columns: 1fr;
    }

    .container {
        width: 92%;
    }

}


/* ========================= */
/* MOBILE */
/* ========================= */

@media (max-width: 500px) {

    .navbar {
        padding: 15px 4%;
    }

    .brand h1 {
        font-size: 15px;
    }

    .connection {
        font-size: 11px;
    }

    .logo {
        width: 38px;
        height: 38px;
    }

    .container {
        width: 94%;
        margin-top: 20px;
    }

    .status-card {
        padding: 18px;

        flex-direction: column;

        align-items: flex-start;

        gap: 15px;
    }

    .status-card .btn {
        width: 100%;
    }

    .card {
        padding: 18px;
        border-radius: 14px;
    }

    .card-header h2 {
        font-size: 18px;
    }

    .led-panel {
        min-height: 110px;
}

    .preview-clock {
        font-size: 22px;
}

    .preview-text {
        font-size: 18px;
}
}
/* TIME INPUT */

input[type="time"] {
    width: 100%;
    background: #0f172a;
    color: white;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 13px;
    font-size: 16px;
    outline: none;
}

input[type="time"]:focus {
    border-color: #06b6d4;
}

/* =========================
   PANEL PREVIEW
========================= */

.led-panel {
    background: #020617;
    border: 5px solid #1e293b;
    border-radius: 8px;

    height: 150px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 12px;

    overflow: hidden;

    position: relative;

    font-family: monospace;
}


/* JAM */

.preview-clock {
    font-size: 32px;
    font-weight: bold;

    color: #22c55e;

    text-shadow:
        0 0 5px #22c55e,
        0 0 15px #22c55e;

    z-index: 2;
}


/* RUNNING TEXT */

.preview-text {
    font-size: 24px;
    font-weight: bold;

    color: #ef4444;

    text-shadow:
        0 0 5px #ef4444,
        0 0 12px #ef4444;

    white-space: nowrap;

    display: inline-block;

    position: relative;
}


/* MOBILE */

@media (max-width: 500px) {

    .led-panel {
        height: 110px;
    }

    .preview-clock {
        font-size: 22px;
    }

    .preview-text {
        font-size: 18px;
    }

}

@keyframes scrollText {

    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-100%);
    }

}

@keyframes moveLeft {

    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-100%);
    }

}

@keyframes moveRight {

    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }

}

@keyframes blinkText {

    0%, 50% {
        opacity: 1;
    }

    51%, 100% {
        opacity: 0;
    }

}