/* Reset dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container utama */
.container {
    max-width: 600px;
    width: 100%;
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Judul */
h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00d4ff 0%, #7b47ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: -0.5px;
}

h1 + h2, h3 {
    color: #b0b0d0;
    font-size: 14px;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Tombol shortcut grid */
.buttons {
    margin-bottom: 30px;
}

.buttons form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.buttons button:first-child {
    grid-column: 1 / -1;
}

.buttons button {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.buttons button:hover:not(:disabled) {
    opacity: 0.9;
}

/* Tombol merah untuk TURN OFF */
.buttons button.btn-red {
    background: linear-gradient(135deg, #ff3d4d 0%, #cc0000 100%);
    box-shadow: 0 10px 30px rgba(255, 61, 77, 0.3);
}

.buttons button.btn-red:hover:not(:disabled) {
    opacity: 0.9;
}

/* Tombol saat aktif (diklik) */
.buttons button.active {
    background: #1a5c1a;
    cursor: not-allowed;
    box-shadow: 0 10px 30px rgba(26, 92, 26, 0.4);
    opacity: 1;
}

.buttons button.btn-red.active {
    background: #8b0000;
    cursor: not-allowed;
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.4);
    opacity: 1;
}

.buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Bagian Manual input */
.manual-input {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.manual-input h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #00d4ff;
}

.manual-input form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.manual-input input[type=text] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    background: #0a0a1a;
    font-size: 15px;
    color: #00ff00;
    font-family: 'Courier New', 'Monaco', monospace;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.manual-input input[type=text]::placeholder {
    color: #00aa00;
    opacity: 0.6;
}

.manual-input input[type=text]:focus {
    outline: none;
    border-color: #00d4ff;
    background: #0f0f25;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.button-group {
    display: flex;
    gap: 12px;
}

.button-group button,
.button-group .btn-data-view {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.2);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.button-group button:hover:not(:disabled),
.button-group .btn-data-view:hover {
    opacity: 0.9;
}

.button-group button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Perintah terakhir */
.current-command {
    padding: 20px;
    background: rgba(255, 235, 59, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 235, 59, 0.2);
}

.current-command h3 {
    margin-bottom: 12px;
    font-size: 14px;
    color: #ffeb3b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.current-command p {
    font-size: 16px;
    font-weight: 600;
    color: #00ff00;
    word-break: break-all;
    font-family: 'Courier New', 'Monaco', monospace;
    letter-spacing: 0.5px;
    text-align: center;
}

/* ===== LOGIN SCREEN ===== */
.login-container {
    max-width: 420px;
    width: 100%;
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.login-container h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00d4ff 0%, #7b47ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-container input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    font-size: 15px;
    color: #e0e0e0;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
}

.login-container input::placeholder {
    color: #707090;
}

.login-container input:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.login-container button {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.2);
    margin-top: 10px;
}

.login-container button:hover {
    opacity: 0.9;
}

.error {
    color: #ff3d4d;
    font-size: 14px;
    padding: 12px;
    background: rgba(255, 61, 77, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ff3d4d;
    margin-bottom: 15px;
    font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 640px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .buttons form {
        grid-template-columns: repeat(2, 1fr);
    }

    .buttons button {
        padding: 14px 16px;
        font-size: 13px;
    }

    .manual-input {
        padding: 20px;
    }

    .login-container {
        padding: 40px 30px;
    }

    .login-container h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .buttons form {
        grid-template-columns: 1fr 1fr;
    }

    .buttons button {
        padding: 12px;
        font-size: 14px;
    }

    .manual-input {
        padding: 15px;
    }

    .current-command {
        padding: 15px;
    }

    .current-command p {
        font-size: 14px;
    }

    .login-container {
        padding: 30px 20px;
    }

    .login-container h2 {
        font-size: 20px;
    }

    .login-container input,
    .login-container button {
        font-size: 14px;
        padding: 12px;
    }
}