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: 25px;
    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;
}

.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;
    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;
}

/* 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;
}

.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;
    cursor: pointer;
}

.mdns-device-item:hover {
    background: #ffffff15;
    border-color: #f0b429;
    transform: translateX(4px);
}

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

.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;
    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;
    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;
    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: #00bcd4;
    color: #00bcd4;
}

.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: inline-block;
    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;
}