* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, sans-serif; }

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    color: #fff;
    padding: 20px;
}

.site-header { max-width: 750px; margin: 0 auto 20px; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.brand { color: #00ffc8; text-decoration: none; font-weight: 700; letter-spacing: 2px; }
.nav-links { list-style: none; display: flex; gap: 20px; }
.nav-links a { color: #8899bb; text-decoration: none; font-size: 0.9rem; transition: color .3s; }
.nav-links a:hover { color: #00ffc8; }

.container {
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid rgba(0, 255, 200, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 750px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0, 255, 200, 0.15), 0 0 80px rgba(0, 100, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid rgba(0, 255, 200, 0.3); }
.header h1 { font-size: 1.8rem; letter-spacing: 2px; margin-bottom: 10px; }
.header h1 a { color: #00ffc8; text-decoration: none; text-shadow: 0 0 10px rgba(0, 255, 200, 0.5); transition: all .3s; }
.header h1 a:hover { color: #fff; text-shadow: 0 0 20px rgba(0, 255, 200, 0.9); }
.subtitle { font-size: 0.9rem; color: #8899bb; letter-spacing: 3px; text-transform: uppercase; }

.form-group { margin-bottom: 22px; }
label { display: block; margin-bottom: 8px; color: #00ffc8; font-weight: 600; font-size: 0.95rem; letter-spacing: 1px; }
.hint { font-size: 0.75rem; color: #8899bb; font-weight: 400; margin-left: 8px; }
.char-count { float: right; font-size: 0.75rem; color: #667788; font-weight: 400; }

input[type="text"], input[type="number"], select {
    width: 100%; padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 200, 0.25);
    border-radius: 10px; color: #fff; font-size: 1rem; outline: none;
    transition: all .3s;
}
input:focus, select:focus { border-color: #00ffc8; box-shadow: 0 0 15px rgba(0, 255, 200, 0.3); background: rgba(0, 255, 200, 0.05); }
input::placeholder { color: #556677; }

.radio-group { display: flex; gap: 15px; }
.radio-option { flex: 1; position: relative; }
.radio-option input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 2; }
.radio-option label {
    display: block; padding: 14px; text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 200, 0.25);
    border-radius: 10px; cursor: pointer; transition: all .3s;
    margin-bottom: 0; font-weight: 700; letter-spacing: 2px;
}
.radio-option input:checked + label {
    background: rgba(0, 255, 200, 0.15);
    border-color: #00ffc8;
    box-shadow: 0 0 15px rgba(0, 255, 200, 0.4);
    color: #00ffc8;
}

.stream-section {
    background: rgba(0, 255, 200, 0.05);
    border: 1px dashed rgba(0, 255, 200, 0.4);
    border-radius: 12px; padding: 20px; margin-bottom: 22px;
}
.stream-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.stream-header h3 { color: #00ffc8; font-size: 1rem; letter-spacing: 1px; }

.ssl-toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.toggle-switch { position: relative; width: 50px; height: 26px; display: inline-block; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch .slider {
    position: absolute; inset: 0; cursor: pointer;
    background: rgba(255, 255, 255, 0.15); border-radius: 26px; transition: .3s;
}
.toggle-switch .slider:before {
    content: ""; position: absolute; height: 20px; width: 20px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s;
}
.toggle-switch input:checked + .slider { background: #00ffc8; }
.toggle-switch input:checked + .slider:before { transform: translateX(24px); background: #0f0c29; }
.ssl-label { color: #ccddee; font-size: 0.9rem; }

.url-input-group { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.url-input-group input { flex: 1; min-width: 80px; }
.url-input-group .port { width: 90px; flex: none; }
.url-input-group .path { flex: 2; min-width: 120px; }
.url-input-group .sep { color: #00ffc8; font-weight: 700; font-size: 1.1rem; }

.btn-transmit, .btn-stop {
    width: 100%; padding: 18px;
    border: none; border-radius: 12px;
    font-size: 1.2rem; font-weight: 800; letter-spacing: 3px;
    cursor: pointer; text-transform: uppercase; margin-top: 10px;
    transition: all .3s;
}
.btn-transmit {
    background: linear-gradient(135deg, #00ffc8, #00b894);
    color: #0f0c29;
    box-shadow: 0 5px 20px rgba(0, 255, 200, 0.3);
}
.btn-transmit:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 255, 200, 0.5); }
.btn-transmit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-stop {
    background: linear-gradient(135deg, #ff3c3c, #c0392b);
    color: #fff;
    box-shadow: 0 5px 20px rgba(255, 60, 60, 0.3);
}
.btn-stop:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255, 60, 60, 0.5); }

.status-message { margin-top: 15px; padding: 12px 18px; border-radius: 10px; font-size: 0.9rem; display: none; text-align: center; white-space: pre-line; }
.status-message.success { display: block; background: rgba(0, 255, 200, 0.15); border: 1px solid #00ffc8; color: #00ffc8; }
.status-message.error   { display: block; background: rgba(255, 60, 60, 0.15); border: 1px solid #ff3c3c; color: #ff6b6b; }

.cars-panel {
    margin-top: 30px; padding: 20px;
    background: rgba(0, 255, 200, 0.05);
    border: 1px solid rgba(0, 255, 200, 0.3);
    border-radius: 12px;
}
.cars-panel h3 { color: #00ffc8; font-size: 1rem; letter-spacing: 1px; margin-bottom: 15px; display: flex; justify-content: space-between; }
.car-count { background: #00ffc8; color: #0f0c29; padding: 2px 10px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; }
.cars-list { display: flex; flex-direction: column; gap: 8px; }
.car-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 15px; background: rgba(255, 255, 255, 0.05);
    border-radius: 8px; font-size: 0.9rem;
}
.car-item .car-id { color: #00ffc8; font-weight: 600; }
.car-item .car-status { font-size: 0.8rem; padding: 2px 8px; border-radius: 4px; }
.car-item .car-status.online  { background: rgba(0, 255, 200, 0.2); color: #00ffc8; }
.car-item .car-status.offline { background: rgba(255, 60, 60, 0.2); color: #ff6b6b; }

.site-footer { max-width: 750px; margin: 30px auto 0; text-align: center; font-size: 0.8rem; color: #667788; letter-spacing: 1px; }
.site-footer a { color: #00ffc8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .container { padding: 25px 20px; }
    .header h1 { font-size: 1.3rem; }
    .radio-group { flex-direction: column; }
    .url-input-group { flex-direction: column; align-items: stretch; }
    .url-input-group input, .url-input-group .port, .url-input-group .path { width: 100%; flex: none; }
    .url-input-group .sep { display: none; }
}