body {
    font-family: 'Montserrat', 'Arial', sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 380px;
    margin: 40px auto;
    background-color: #222222;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.section {
    margin-top: 20px;
    padding: 18px;
    background: #ffffff15;
    border-radius: 8px;
    border: 1px solid #ffffff30;
}

header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

header img {
    height: 50px;
    margin-right: 10px;
}

h1 {
    color: #f0b429;
    margin: 0;
    font-size: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h3 {
    color: var(--color-info);
    font-size: 14px;
    margin: 10px 0;
}

.intro-text {
    text-align: center;
    font-size: 15px;
    color: #00bcd4;
    margin-bottom: 10px;
    opacity: 0.9;
}

/* Botones principales */
.btn-primary {
    width: 100%;
    padding: 16px;
    border-radius: 6px;
    background-color: #f0b429;
    border: none;
    color: #1a1a1a;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    transition: background-color 0.25s, transform 0.1s;
    cursor: pointer;
    margin-bottom: 12px;
}

.btn-primary:hover {
    background-color: #d99a26;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    margin-bottom:2px;
    border-radius: 6px;
    background-color: transparent;
    border: 1px solid #00bcd4;
    color: #00bcd4;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: all 0.25s;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #00bcd415;
    border-color: #00d4e0;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* Mensajes de estado */
.status-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.status-message.info {
    display: block;
    background: #ffffff15;
    border: 1px solid #00bcd4;
    color: #00bcd4;
}

.status-message.error {
    display: block;
    background: #ffffff15;
    border: 1px solid #cc3333;
    color: #cc3333;
}

.status-message.success {
    display: block;
    background: #ffffff15;
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.status-message:empty {
    display: none;
}

/* Dispositivo guardado */
.saved-device-info {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    background: #ffffff08;
    border-radius: 6px;
    border: 1px solid #ffffff20;
}

.saved-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.saved-name {
    color: #f0b429;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 6px;
    word-break: break-word;
}

.saved-label {
    color: #00bcd4;
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Primera vez */
.welcome-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
    opacity: 0.4;
}

.welcome-logo {
    display: block;
    margin: 0 auto 12px auto;
    max-width: 140px;
    width: 25%;
    height: auto;
    opacity: 0.9;
}

.welcome-logo {
    filter: drop-shadow(0 0 8px #f0b42955);
}

.platform-desc {
    text-align: center;
    color: #00bcd4;
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* mDNS Discovery */
.mdns-discovery {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ffffff20;
}

.mdns-discovery h3,
.manual-connection h3 {
    color: #00bcd4;
    font-size: 14px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.help-text {
    color: #999;
    font-size: 13px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.device-list-mdns {
    margin: 15px 0;
    min-height: 60px;
}

.mdns-device-item {
    background: #ffffff08;
    border: 1px solid #ffffff20;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.mdns-device-item:hover {
    background: #ffffff12;
    border-color: #f0b42988;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 180, 41, 0.15);
}


.mdns-device-item:active {
    transform: scale(0.98);
}

.mdns-device-chevron {
    margin-left: 10px;
    font-size: 18px;
    color: #f0b429;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.mdns-device-item:hover .mdns-device-chevron {
    transform: translateX(3px);
    opacity: 1;
}


.mdns-device-info {
    flex-grow: 1;
}

.mdns-device-name {
    color: #f0b429;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
}

.mdns-device-url {
    color: #00bcd4;
    font-size: 11px;
    opacity: 0.8;
    font-family: monospace;
}

.mdns-device-icon {
    font-size: 24px;
    opacity: 0.6;
}

.mdns-scanning {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}

.mdns-empty {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
    background: #ffffff05;
    border-radius: 6px;
}

/* Manual connection */
.manual-connection {
    margin-top: 20px;
}

.input-group {
    display: flex;
    align-items: center;
    background: #333;
    border-radius: 6px;
    border: 1px solid #444;
    padding: 4px 8px;
    margin-bottom: 15px;
    margin-left: auto;
    margin-right: auto;
    max-width: 280px;
    transition: border-color 0.25s;
}

.input-group:focus-within {
    border-color: #f0b429;
}

.input-prefix,
.input-suffix {
    color: #999;
    font-size: 14px;
    font-family: monospace;
    white-space: nowrap;
}

.input-group input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 6px;
    color: #f0b429;
    text-align: center;
    font-weight: bold;
    font-family: monospace;
    font-size: 14px;
    outline: none;
    min-width: 80px;
}

.input-group input::placeholder {
    color: #666;
    font-weight: normal;
}

/* Spinner de carga */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(240, 180, 41, 0.3);
    border-top-color: #f0b429;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    text-align: center;
    font-size: 14px;
    color: #ccc;
    padding: 10px 0;
    margin-top: 30px;
    opacity: 0.6;
}

.platform-info {
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.5;
}

/* Warning box */
.warning-box {
    background: #ffffff08 !important;
    border: 2px solid #cc3333 !important;
}

.warning-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 12px;
}

.warning-title {
    color: #cc3333;
    font-size: 16px;
    margin: 0 0 12px 0;
    text-align: center;
    text-transform: uppercase;
}

.warning-text {
    color: #e0e0e0;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.warning-subtext {
    color: #999;
    font-size: 12px;
    margin-top: 12px;
    font-style: italic;
}

.browser-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.browser-list li {
    padding: 6px 12px;
    margin: 4px 0;
    background: #ffffff08;
    border-radius: 4px;
    font-size: 14px;
}

/* Help section */
.help-section {
    margin-top: 20px;
}

.help-toggle {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    background-color: transparent;
    border: 1px solid #666;
    color: #999;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s;
}

.help-toggle:hover {
    border-color: #f0b429;
    color: #f0b429;
    background: #f0b42910;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(240, 180, 41, 0.1);
}


.help-content {
    margin-top: 12px;
    padding: 16px;
    background: #ffffff08;
    border-radius: 6px;
    border: 1px solid #ffffff20;
}

.help-content h4 {
    color: #00bcd4;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.help-content ul {
    margin: 0;
    padding-left: 20px;
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.8;
}

.help-content ul li {
    margin-bottom: 8px;
}

.help-alternative {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ffffff20;
    font-size: 13px;
    color: #999;
    line-height: 1.6;
}

.help-alternative code {
    background: #ffffff15;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #f0b429;
    font-size: 12px;
}

/* URL example styling */
.url-example {
    display: block; /*inline-block;*/
    text-align: center;
    margin: 10px auto;
    background: #ffffff15;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: monospace;
    color: #00bcd4;
    font-size: 12px;
    white-space: nowrap;
}

.placeholder {
    color: #f0b429;
    font-weight: bold;
    font-style: italic;
    text-decoration: underline dotted;
    cursor: help;
    position: relative;
}

.placeholder:hover {
    color: #ffc107;
}

.mdns-device-item.saved-device {
    border: 2px solid #f0b429;
    background: #f0b42922;
    box-shadow: 0 0 10px #f0b42955;
}

.mdns-device-item.saved-device .mdns-device-name::after {
    content: " (último)";
    font-size: 11px;
    color: #00bcd4;
    margin-left: 6px;
}

.success-center {
    display: block;
    text-align: center;
    margin-top: 8px;
    color: #2ecc71;      /* verde éxito */
    font-weight: bold;
}

.mdns-device-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    margin-top: 2px;
}

/* online */
.mdns-device-status.online {
    color: #00bcd4;
    background: rgba(0, 188, 212, 0.12);
    border: 1px solid rgba(0, 188, 212, 0.35);
}

/* offline */
.mdns-device-status.offline {
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.device-remove {
    background: transparent;
    border: none;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    padding: 6px;
    margin-left: 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.device-remove:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.12);
    opacity: 1;
}

.device-remove:active {
    transform: scale(0.9);
}

.device-list-mdns {
    margin: 20px 0 10px 0;
}

.mdns-discovery {
    margin-top: 10px;
}

.mdns-device-info {
    display: flex;
    flex-direction: column;
}

.mdns-device-icon {
    font-size: 22px;
    opacity: 0.7;
    margin-left: 10px;
}

.section-help {
    font-size: 13px;
    color: #6b7280;       /* gris suave */
    margin-top: 4px;
    margin-bottom: 12px;
}

.field-help {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

.section-title {
    margin-bottom: 2px;
}

/* Estilo para instrucciones iOS */
/* iOS Instructions Styles */
.ios-setup-instructions {
    margin-top: 20px;
}

.instruction-card {
    background: #f8f9fa;
    border-left: 4px solid #0a5c5a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.instruction-card.success {
    background: #f0f9f4;
    border-left-color: #10b981;
}

.step-number {
    background: #0a5c5a;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.instruction-card.success .step-number {
    background: #10b981;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin: 0 0 10px 0;
    color: #1a1a1a;
    font-size: 16px;
}

.step-content p {
    margin: 8px 0;
    color: #666;
    line-height: 1.5;
}

.step-content .help-text {
    font-size: 14px;
    color: #888;
}

/* .highlight {
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #856404;
    font-weight: 500;
} */

.highlight {
    color: #f0b429;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
}

.input-group {
    margin: 15px 0;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}